fix: bugs in tray icon

This commit is contained in:
hiddify-com
2024-08-04 22:51:36 +02:00
parent b85894ef0a
commit f54fe79d30
2 changed files with 35 additions and 15 deletions

View File

@@ -7,6 +7,15 @@ class AppDelegate: FlutterAppDelegate {
// https://github.com/leanflutter/window_manager/issues/214
return false
}
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Request notification authorization
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge]) { granted, error in
if let error = error {
print("Error requesting notification authorization: \(error)")
}
}
}
// // window manager restore from dock: https://leanflutter.dev/blog/click-dock-icon-to-restore-after-closing-the-window
// override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {