From 5dbbb0fcfa6939faf65235636ea5fb3524a09295 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 6 Dec 2022 22:58:06 +0800 Subject: [PATCH] Prefs // +kPhraseEditorAutoReloadExternalModifications. --- .../Sources/Shared/Protocols/PrefMgrProtocol.swift | 1 + Packages/vChewing_Shared/Sources/Shared/Shared.swift | 1 + Source/Modules/PrefMgr_Core.swift | 3 +++ 3 files changed, 5 insertions(+) diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift index 1cd57c99..2d3be9d3 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift @@ -54,6 +54,7 @@ public protocol PrefMgrProtocol { var showReverseLookupInCandidateUI: Bool { get set } var autoCompositeWithLongestPossibleCassetteKey: Bool { get set } var shareAlphanumericalModeStatusAcrossClients: Bool { get set } + var phraseEditorAutoReloadExternalModifications: Bool { get set } var cns11643Enabled: Bool { get set } var cassetteEnabled: Bool { get set } var symbolInputEnabled: Bool { get set } diff --git a/Packages/vChewing_Shared/Sources/Shared/Shared.swift b/Packages/vChewing_Shared/Sources/Shared/Shared.swift index 04c2a039..daf0613a 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Shared.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Shared.swift @@ -67,6 +67,7 @@ public enum UserDef: String, CaseIterable { case kShowReverseLookupInCandidateUI = "ShowReverseLookupInCandidateUI" case kAutoCompositeWithLongestPossibleCassetteKey = "AutoCompositeWithLongestPossibleCassetteKey" case kShareAlphanumericalModeStatusAcrossClients = "ShareAlphanumericalModeStatusAcrossClients" + case kPhraseEditorAutoReloadExternalModifications = "PhraseEditorAutoReloadExternalModifications" case kUseIMKCandidateWindow = "UseIMKCandidateWindow" case kHandleDefaultCandidateFontsByLangIdentifier = "HandleDefaultCandidateFontsByLangIdentifier" diff --git a/Source/Modules/PrefMgr_Core.swift b/Source/Modules/PrefMgr_Core.swift index 81c8a1a1..45a4fa19 100644 --- a/Source/Modules/PrefMgr_Core.swift +++ b/Source/Modules/PrefMgr_Core.swift @@ -155,6 +155,9 @@ public class PrefMgr: PrefMgrProtocol { @AppProperty(key: UserDef.kShareAlphanumericalModeStatusAcrossClients.rawValue, defaultValue: false) public var shareAlphanumericalModeStatusAcrossClients: Bool + @AppProperty(key: UserDef.kPhraseEditorAutoReloadExternalModifications.rawValue, defaultValue: true) + public var phraseEditorAutoReloadExternalModifications: Bool + // MARK: - Settings (Tier 2) @AppProperty(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false)