From 15f0d94c21e9ab285530b6f098c101cea760cf26 Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 19 Nov 2021 20:09:08 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62961=2011=E5=86=85=E7=BD=AE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=B2=A1=E6=9C=89=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/DesignerEnvManager.java | 11 +++++++++++ .../fr/design/mainframe/ComponentReuseNotifyUtil.java | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index ca85a65171..9d84e25bae 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -19,6 +19,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.locale.impl.ProductImproveMark; import com.fr.design.login.DesignerLoginType; import com.fr.design.login.config.DesignerLoginConfigManager; +import com.fr.design.mainframe.ComponentReuseNotifyUtil; import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo; import com.fr.design.mainframe.vcs.VcsConfigManager; import com.fr.design.notification.SnapChatConfig; @@ -415,6 +416,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { private void compatibilityPrevVersion(File prevEnvFile) { try { XMLTools.readFileXML(designerEnvManager, prevEnvFile); + clearOldVersionDesignerEnvProperties(); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } @@ -424,6 +426,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { designerEnvManager.saveXMLFile(); } + private void clearOldVersionDesignerEnvProperties() { + SnapChatConfig snapChatConfig = designerEnvManager.getSnapChatConfig(); + snapChatConfig.resetRead(ComponentReuseNotifyUtil.COMPONENT_SNAP_CHAT_KEY); + } + public static void setEnvFile(File envFile) { DesignerEnvManager.envFile = envFile; } @@ -2332,4 +2339,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { DesignerExiter.getInstance().execute(); } } + + public SnapChatConfig getSnapChatConfig() { + return snapChatConfig; + } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java b/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java index 2175804dcf..2dc77bb62c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/ComponentReuseNotifyUtil.java @@ -12,7 +12,7 @@ import com.fr.design.notification.SnapChatKey; * Created by kerry on 5/8/21 */ public class ComponentReuseNotifyUtil { - private static final String COMPONENT_SNAP_CHAT_KEY = "com.fr.component.share-components"; + public static final String COMPONENT_SNAP_CHAT_KEY = "com.fr.component.share-components"; private ComponentReuseNotifyUtil() {