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