diff --git a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java index b55469af11..8adebba4f1 100644 --- a/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java +++ b/designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java @@ -6,6 +6,7 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.event.DesignerOpenedListener; import com.fr.design.mainframe.DesignerContext; import com.fr.design.os.impl.SupportOSImpl; +import com.fr.design.update.push.DesignerPushUpdateManager; import com.fr.stable.StringUtils; import javax.swing.WindowConstants; @@ -33,7 +34,8 @@ public class DesignerGuideHelper { } public static void prepareShowGuideDialog() { - if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv()) { + // 如果存在更新升级的弹窗,则不显示引导页面 + if (!SupportOSImpl.DESIGNER_LOGIN.support() || !FRContext.isChineseEnv() || DesignerPushUpdateManager.getInstance().isShouldPopUp()) { return; } if (isActivatedForOneWeek()) { diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java index efd809e791..6214f1cfa9 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java @@ -27,6 +27,8 @@ public class DesignerPushUpdateManager { private DesignerUpdateInfo updateInfo; + private boolean shouldPopUp = false; + private DesignerPushUpdateManager() { } @@ -91,13 +93,14 @@ public class DesignerPushUpdateManager { * 检查更新,如果有合适的更新版本,则弹窗 */ private void checkAndPop() { + if (!shouldPopUp()) { + this.shouldPopUp = true; + FineLoggerFactory.getLogger().debug("skip push update"); + return; + } checkUpdateService.execute(new Runnable() { @Override public void run() { - if (!shouldPopUp()) { - FineLoggerFactory.getLogger().debug("skip push update"); - return; - } final DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerPushUpdateDialog.createAndShow(designerFrame, updateInfo); } @@ -139,6 +142,10 @@ public class DesignerPushUpdateManager { return StringUtils.isNotEmpty(prefix) && fullCurrentVersion.contains(SPLIT_CHAR); } + public boolean isShouldPopUp() { + return shouldPopUp; + } + /** * 跳转到更新升级窗口,并自动开始更新 */