SessionCtl // Add isCandidateState().

This commit is contained in:
ShikiSuen 2022-11-25 12:09:22 +08:00
parent 0b2a046885
commit 6f579fafd8
2 changed files with 3 additions and 0 deletions

View File

@ -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 }
}

View File

@ -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
}