ente/auth/macos/Runner/AppDelegate.swift
Tomasz Mikus fca8e13c03 Add the ability to show the Ente Auth window on macOS after it was closed.
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.
2024-10-05 10:29:55 +01:00

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
}
}