KeyHandler // Disable ! among delegate calls.

This commit is contained in:
ShikiSuen 2022-07-24 11:06:50 +08:00
parent e3ac5792ec
commit 2d76d74334
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ extension KeyHandler {
// MARK: Enter // MARK: Enter
if input.isEnter { if input.isEnter {
delegate!.keyHandler( delegate?.keyHandler(
self, self,
didSelectCandidateAt: ctlCandidateCurrent.selectedCandidateIndex, didSelectCandidateAt: ctlCandidateCurrent.selectedCandidateIndex,
ctlCandidate: ctlCandidateCurrent ctlCandidate: ctlCandidateCurrent
@ -297,7 +297,7 @@ extension KeyHandler {
if index != NSNotFound { if index != NSNotFound {
let candidateIndex = ctlCandidateCurrent.candidateIndexAtKeyLabelIndex(index) let candidateIndex = ctlCandidateCurrent.candidateIndexAtKeyLabelIndex(index)
if candidateIndex != Int.max { if candidateIndex != Int.max {
delegate!.keyHandler( delegate?.keyHandler(
self, didSelectCandidateAt: candidateIndex, ctlCandidate: ctlCandidateCurrent self, didSelectCandidateAt: candidateIndex, ctlCandidate: ctlCandidateCurrent
) )
return true return true
@ -337,7 +337,7 @@ extension KeyHandler {
if shouldAutoSelectCandidate { if shouldAutoSelectCandidate {
let candidateIndex = ctlCandidateCurrent.candidateIndexAtKeyLabelIndex(0) let candidateIndex = ctlCandidateCurrent.candidateIndexAtKeyLabelIndex(0)
if candidateIndex != Int.max { if candidateIndex != Int.max {
delegate!.keyHandler( delegate?.keyHandler(
self, self,
didSelectCandidateAt: candidateIndex, didSelectCandidateAt: candidateIndex,
ctlCandidate: ctlCandidateCurrent ctlCandidate: ctlCandidateCurrent