SessionCtl // Revise the usage of forceCleanup parameter.

This commit is contained in:
ShikiSuen 2023-02-10 18:50:39 +08:00
parent 17da7f83cf
commit 5245585b60
1 changed files with 3 additions and 3 deletions

View File

@ -131,7 +131,7 @@ public class SessionCtl: IMKInputController {
if PrefMgr.shared.onlyLoadFactoryLangModelsIfNeeded { LMMgr.loadDataModel(inputMode) } if PrefMgr.shared.onlyLoadFactoryLangModelsIfNeeded { LMMgr.loadDataModel(inputMode) }
if oldValue != inputMode, inputMode != .imeModeNULL { if oldValue != inputMode, inputMode != .imeModeNULL {
/// 調 /// 調
resetInputHandler(forceComposerCleanup: true) resetInputHandler()
// ---------------------------- // ----------------------------
/// ///
inputHandler?.currentLM = LMMgr.currentLM // inputHandler?.currentLM = LMMgr.currentLM //
@ -263,7 +263,7 @@ public extension SessionCtl {
_ = sender // _ = sender //
DispatchQueue.main.async { [self] in DispatchQueue.main.async { [self] in
isActivated = false isActivated = false
resetInputHandler(forceComposerCleanup: true) // Empty resetInputHandler() // Empty
switchState(IMEState.ofDeactivated()) switchState(IMEState.ofDeactivated())
inputHandler = nil inputHandler = nil
// IMK nil IMK // IMK nil IMK
@ -343,7 +343,7 @@ public extension SessionCtl {
/// IMK Bug /// IMK Bug
override func inputControllerWillClose() { override func inputControllerWillClose() {
// //
resetInputHandler(forceComposerCleanup: true) resetInputHandler()
super.inputControllerWillClose() super.inputControllerWillClose()
} }
} }