From 1fe044204271dc8cdf331504999cf1f99afe5f60 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 27 Nov 2022 08:38:23 +0800 Subject: [PATCH] SessionCtl // Bind the tooltip display duration property. --- Source/Modules/SessionCtl_HandleStates.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Modules/SessionCtl_HandleStates.swift b/Source/Modules/SessionCtl_HandleStates.swift index 409a5c47..0f4c25d4 100644 --- a/Source/Modules/SessionCtl_HandleStates.swift +++ b/Source/Modules/SessionCtl_HandleStates.swift @@ -63,14 +63,16 @@ extension SessionCtl { if previous.hasComposition, ![.ofAbortion, .ofCommitting].contains(newState.type) { commit(text: previous.displayedText) } - showTooltip(newState.tooltip, duration: 1) // 會在工具提示為空的時候自動消除顯示。 + // 會在工具提示為空的時候自動消除顯示。 + showTooltip(newState.tooltip, duration: newState.tooltipDuration) clearInlineDisplay() inputHandler?.clear() case .ofInputting: candidateUI?.visible = false commit(text: newState.textToCommit) setInlineDisplayWithCursor() - showTooltip(newState.tooltip, duration: 1) // 會在工具提示為空的時候自動消除顯示。 + // 會在工具提示為空的時候自動消除顯示。 + showTooltip(newState.tooltip, duration: newState.tooltipDuration) case .ofMarking: candidateUI?.visible = false setInlineDisplayWithCursor()