SessionCtl // Make clientBundleIdentifier into a stored variable.

This commit is contained in:
ShikiSuen 2023-02-09 16:43:17 +08:00
parent ba164520fc
commit 8b0283cf51
2 changed files with 5 additions and 5 deletions

View File

@ -43,6 +43,10 @@ public class SessionCtl: IMKInputController {
///
public var isServingIMEItself: Bool = false
/// bundleIdentifier
///
public var clientBundleIdentifier: String = ""
// MARK: -
/// Caps Lock
@ -216,6 +220,7 @@ public extension SessionCtl {
if let senderBundleID: String = (sender as? IMKTextInput)?.bundleIdentifier() {
vCLog("activateServer(\(senderBundleID))")
isServingIMEItself = Bundle.main.bundleIdentifier == senderBundleID
clientBundleIdentifier = senderBundleID
}
}
DispatchQueue.main.async {

View File

@ -11,11 +11,6 @@ import Shared
// MARK: - InputHandler Delegate
extension SessionCtl: InputHandlerDelegate {
public var clientBundleIdentifier: String {
guard let client = client() else { return "" }
return client.bundleIdentifier() ?? ""
}
public func candidateController() -> CtlCandidateProtocol? { candidateUI }
public func candidateSelectionCalledByInputHandler(at index: Int) {