From 2d3d0d3fc2d7bc0293c2c999efc0d295b170d7bd Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 20 Jun 2023 09:10:05 +0800 Subject: [PATCH] Repo // Simplify conditions for updatePopupDisplayWithCursor(). --- Source/Modules/InputHandler_Core.swift | 4 +--- Source/Modules/SessionCtl_Delegates.swift | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Source/Modules/InputHandler_Core.swift b/Source/Modules/InputHandler_Core.swift index f466685b..75484353 100644 --- a/Source/Modules/InputHandler_Core.swift +++ b/Source/Modules/InputHandler_Core.swift @@ -433,9 +433,7 @@ public class InputHandler: InputHandlerProtocol { theState.data.marker = inputting.marker delegate.state = theState // 直接就地取代,不經過 switchState 處理,免得選字窗被重新載入。 delegate.setInlineDisplayWithCursor() - if delegate.clientMitigationLevel >= 2, theState.hasComposition { - delegate.updatePopupDisplayWithCursor() - } + delegate.updatePopupDisplayWithCursor() } // MARK: - Extracted methods and functions (Tekkon). diff --git a/Source/Modules/SessionCtl_Delegates.swift b/Source/Modules/SessionCtl_Delegates.swift index 1669da46..4153a713 100644 --- a/Source/Modules/SessionCtl_Delegates.swift +++ b/Source/Modules/SessionCtl_Delegates.swift @@ -140,9 +140,7 @@ extension SessionCtl: CtlCandidateDelegate { state.data.cursor = 0 } setInlineDisplayWithCursor() - if clientMitigationLevel >= 2, state.hasComposition { - updatePopupDisplayWithCursor() - } + updatePopupDisplayWithCursor() default: break } }