SessionCtl // +isCandidateContextMenuEnabled().

This commit is contained in:
ShikiSuen 2022-11-27 20:23:21 +08:00
parent 58bcea2507
commit dd964b3c40
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ public protocol CtlCandidateDelegate {
var selectionKeys: String { get }
var isVerticalTyping: Bool { get }
var isCandidateState: Bool { get }
var isCandidateContextMenuEnabled: Bool { get }
var showReverseLookupResult: Bool { get }
}

View File

@ -57,7 +57,7 @@ extension SessionCtl: InputHandlerDelegate {
extension SessionCtl: CtlCandidateDelegate {
public var isCandidateState: Bool { state.isCandidateContainer }
public var isCandidateContextMenuEnabled: Bool { state.type == .ofCandidates }
public var showReverseLookupResult: Bool {
!isVerticalTyping && PrefMgr.shared.showReverseLookupInCandidateUI
}