LMMgr & AppDelegate // Connecting PhraseEditorCocoa to the IME.

This commit is contained in:
ShikiSuen 2022-12-07 20:22:51 +08:00
parent 36e9a0c1dd
commit 1a9fd9b2c1
2 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,9 @@ extension AppDelegate {
// 100ms 使使
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1) {
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
if PrefMgr.shared.phraseEditorAutoReloadExternalModifications {
CtlPrefWindow.shared?.updatePhraseEditor()
}
if PrefMgr.shared.shouldAutoReloadUserDataFiles { LMMgr.initUserLangModels() }
}
}

View File

@ -602,6 +602,9 @@ public class LMMgr {
// The new FolderMonitor module does NOT monitor cases that files are modified
// by the current application itself, requiring additional manual loading process here.
if #available(macOS 10.15, *) { FileObserveProject.shared.touch() }
if PrefMgr.shared.phraseEditorAutoReloadExternalModifications {
CtlPrefWindow.shared?.updatePhraseEditor()
}
loadUserPhrasesData(type: .thePhrases)
return true
}