SessionCtl // Introduce forceCleanup() to resetInputHandler().

This commit is contained in:
ShikiSuen 2022-11-13 17:54:19 +08:00
parent 8f7d452a1d
commit e3b16e9661
1 changed files with 2 additions and 2 deletions

View File

@ -166,9 +166,9 @@ extension SessionCtl {
} }
/// 調 /// 調
public func resetInputHandler() { public func resetInputHandler(forceComposerCleanup forceCleanup: Bool = false) {
// //
if state.type == .ofInputting, PrefMgr.shared.trimUnfinishedReadingsOnCommit { if state.type == .ofInputting, PrefMgr.shared.trimUnfinishedReadingsOnCommit || forceCleanup {
inputHandler.clearComposerAndCalligrapher() inputHandler.clearComposerAndCalligrapher()
switchState(inputHandler.generateStateOfInputting()) switchState(inputHandler.generateStateOfInputting())
} }