diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift index 5e673391..ba45bd4d 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/CtlCandidateProtocol.swift @@ -15,6 +15,7 @@ public protocol CtlCandidateDelegate { @discardableResult func reverseLookup(for value: String) -> [String] var selectionKeys: String { get } var isVerticalTyping: Bool { get } + var isCandidateState: Bool { get } var showReverseLookupResult: Bool { get } } diff --git a/Source/Modules/SessionCtl_Delegates.swift b/Source/Modules/SessionCtl_Delegates.swift index a538c0c8..00ab6081 100644 --- a/Source/Modules/SessionCtl_Delegates.swift +++ b/Source/Modules/SessionCtl_Delegates.swift @@ -56,6 +56,8 @@ extension SessionCtl: InputHandlerDelegate { // MARK: - Candidate Controller Delegate extension SessionCtl: CtlCandidateDelegate { + public var isCandidateState: Bool { state.isCandidateContainer } + public var showReverseLookupResult: Bool { !isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI }