mirror of
https://github.com/ente-io/ente.git
synced 2025-07-05 23:17:26 +00:00
Currently, nothing happens when the user closes the Ente Auth window on macOS and then clicks on the Ente Auth icon in the dock. This commit changes this behaviour and brings it in-line with other macOS applications by showing the main application window when the user clicks on the dock icon.
17 lines
414 B
Swift
17 lines
414 B
Swift
import Cocoa
|
|
import FlutterMacOS
|
|
|
|
@main
|
|
class AppDelegate: FlutterAppDelegate {
|
|
override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
|
|
if !flag {
|
|
sender.windows.first?.makeKeyAndOrderFront(self)
|
|
}
|
|
return true
|
|
}
|
|
|
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
|
return false
|
|
}
|
|
}
|