PrefMgr // Remove unnecessary GCD.

This commit is contained in:
ShikiSuen 2022-09-21 13:01:17 +08:00
parent d3668d9f0b
commit e1648fc1a7
1 changed files with 3 additions and 9 deletions

View File

@ -239,35 +239,29 @@ public class PrefMgr: PrefMgrProtocol {
public var useSCPCTypingMode: Bool {
willSet {
if newValue {
DispatchQueue.main.async {
LMMgr.loadUserSCPCSequencesData()
}
}
}
}
@AppProperty(key: UserDef.kPhraseReplacementEnabled.rawValue, defaultValue: false)
public var phraseReplacementEnabled: Bool {
willSet {
LMMgr.setPhraseReplacementEnabled(newValue)
if newValue {
DispatchQueue.main.async {
LMMgr.loadUserPhraseReplacement()
}
}
}
}
@AppProperty(key: UserDef.kAssociatedPhrasesEnabled.rawValue, defaultValue: false)
public var associatedPhrasesEnabled: Bool {
willSet {
if newValue {
DispatchQueue.main.async {
LMMgr.loadUserAssociatesData()
}
}
}
}
// MARK: - Keyboard HotKey Enable / Disable