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 f867d6cfd..dcb5d45fd 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 @@ -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()); } }