Skip to content

Commit 48f5056

Browse files
ZhaoChaoqunclaude
andcommitted
Remove duplicate accessibility permission request
The accessibility permission is already requested in KeyMonitor.startMonitoring(), so the duplicate request in checkPermissions() was unnecessary. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f0dd267 commit 48f5056

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Sources/TypelessApp.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
7878
}
7979

8080
private func checkPermissions() {
81+
// 请求麦克风权限
8182
AVCaptureDevice.requestAccess(for: .audio) { granted in
8283
if !granted {
8384
DispatchQueue.main.async { self.showPermissionAlert(for: "麦克风") }
8485
}
8586
}
86-
87-
let options: NSDictionary = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]
88-
_ = AXIsProcessTrustedWithOptions(options)
87+
// 辅助功能权限已在 KeyMonitor.startMonitoring() 中请求
8988
}
9089

9190
private func showPermissionAlert(for permission: String) {

0 commit comments

Comments
 (0)