diff --git a/Source/Modules/InputHandler_HandleComposition.swift b/Source/Modules/InputHandler_HandleComposition.swift index e41eada6..8f645ed7 100644 --- a/Source/Modules/InputHandler_HandleComposition.swift +++ b/Source/Modules/InputHandler_HandleComposition.swift @@ -145,9 +145,7 @@ extension InputHandler { let text: String = firstCandidate.1 delegate.switchState(IMEState.ofCommitting(textToCommit: text)) - if !prefs.associatedPhrasesEnabled { - delegate.switchState(IMEState.ofEmpty()) - } else { + if prefs.associatedPhrasesEnabled { let associatedPhrases = generateStateOfAssociates(withPair: .init(keyArray: [reading], value: text)) delegate.switchState(associatedPhrases.candidates.isEmpty ? IMEState.ofEmpty() : associatedPhrases) } @@ -288,9 +286,7 @@ extension InputHandler { let text: String = firstCandidate.1 delegate.switchState(IMEState.ofCommitting(textToCommit: text)) - if !prefs.associatedPhrasesEnabled { - delegate.switchState(IMEState.ofEmpty()) - } else { + if prefs.associatedPhrasesEnabled { let associatedPhrases = generateStateOfAssociates(withPair: .init(keyArray: [reading], value: text)) delegate.switchState(associatedPhrases.candidates.isEmpty ? IMEState.ofEmpty() : associatedPhrases) }