Browse Source

REPORT-16461 设计器中关闭自动推送更新无效=>调整代码

research/10.0
plough 6 years ago
parent
commit
71025a0b74
  1. 8
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

8
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java

@ -19,13 +19,11 @@ import com.fr.workspace.WorkContext;
public class DesignerPushUpdateManager {
private static final String SPLIT_CHAR = "-";
private static DesignerPushUpdateManager singleton;
private static DesignerPushUpdateConfigManager config;
private DesignerUpdateInfo updateInfo;
static {
config = DesignerPushUpdateConfigManager.getInstance();
if (config.isAutoPushUpdateEnabled()) {
if (DesignerPushUpdateConfigManager.getInstance().isAutoPushUpdateEnabled()) {
DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() {
@Override
public void designerOpened() {
@ -46,7 +44,7 @@ public class DesignerPushUpdateManager {
}
private void initUpdateInfo(String currentVersion, String latestVersion) {
String lastIgnoredVersion = config.getLastIgnoredVersion();
String lastIgnoredVersion = DesignerPushUpdateConfigManager.getInstance().getLastIgnoredVersion();
String updatePushInfo = CloudCenter.getInstance().acquireUrlByKind("update.push");
JSONObject pushData = new JSONObject(updatePushInfo);
@ -165,6 +163,6 @@ public class DesignerPushUpdateManager {
if (updateInfo == null) {
return;
}
config.setLastIgnoredVersion(updateInfo.getPushVersion());
DesignerPushUpdateConfigManager.getInstance().setLastIgnoredVersion(updateInfo.getPushVersion());
}
}

Loading…
Cancel
Save