LMMgr & AppDelegate // Connecting PhraseEditorCocoa to the IME.
This commit is contained in:
parent
36e9a0c1dd
commit
1a9fd9b2c1
|
@ -27,6 +27,9 @@ extension AppDelegate {
|
||||||
// 拖 100ms 再重載,畢竟有些有特殊需求的使用者可能會想使用巨型自訂語彙檔案。
|
// 拖 100ms 再重載,畢竟有些有特殊需求的使用者可能會想使用巨型自訂語彙檔案。
|
||||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
|
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
|
||||||
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
|
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
|
||||||
|
if PrefMgr.shared.phraseEditorAutoReloadExternalModifications {
|
||||||
|
CtlPrefWindow.shared?.updatePhraseEditor()
|
||||||
|
}
|
||||||
if PrefMgr.shared.shouldAutoReloadUserDataFiles { LMMgr.initUserLangModels() }
|
if PrefMgr.shared.shouldAutoReloadUserDataFiles { LMMgr.initUserLangModels() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -602,6 +602,9 @@ public class LMMgr {
|
||||||
// The new FolderMonitor module does NOT monitor cases that files are modified
|
// The new FolderMonitor module does NOT monitor cases that files are modified
|
||||||
// by the current application itself, requiring additional manual loading process here.
|
// by the current application itself, requiring additional manual loading process here.
|
||||||
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
|
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
|
||||||
|
if PrefMgr.shared.phraseEditorAutoReloadExternalModifications {
|
||||||
|
CtlPrefWindow.shared?.updatePhraseEditor()
|
||||||
|
}
|
||||||
loadUserPhrasesData(type: .thePhrases)
|
loadUserPhrasesData(type: .thePhrases)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue