We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e477f0 commit 1ee2083Copy full SHA for 1ee2083
sources/SquirrelInputController.swift
@@ -9,6 +9,7 @@ import InputMethodKit
9
10
final class SquirrelInputController: IMKInputController {
11
private static let keyRollOver = 50
12
+ private static var unknownAppCnt: UInt = 0
13
14
private weak var client: IMKTextInput?
15
private let rimeAPI: RimeApi_stdbool = rime_get_api_stdbool().pointee
@@ -332,7 +333,10 @@ private extension SquirrelInputController {
332
333
}
334
335
func createSession() {
- guard let app = client?.bundleIdentifier() else { return }
336
+ let app = client?.bundleIdentifier() ?? {
337
+ SquirrelInputController.unknownAppCnt &+= 1
338
+ return "UnknownApp\(SquirrelInputController.unknownAppCnt)"
339
+ }()
340
print("createSession: \(app)")
341
currentApp = app
342
session = rimeAPI.create_session()
0 commit comments