Browse Source

如果存在更新升级的弹窗,则不显示引导页面

feature/10.0
Lanlan 4 years ago
parent
commit
0dc7ca9c11
  1. 4
      designer-base/src/main/java/com/fr/design/login/guide/DesignerGuideHelper.java
  2. 15
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

4
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()) {

15
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;
}
/**
* 跳转到更新升级窗口并自动开始更新
*/

Loading…
Cancel
Save