Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add the ability to show the Ente Auth window on macOS after it was closed.

Tomasz Mikusfca8e13c031b
diff --git a/auth/macos/Runner/AppDelegate.swift b/auth/macos/Runner/AppDelegate.swift
index a6f73a80ad..0f8f95c206 100644
--- a/auth/macos/Runner/AppDelegate.swift
+++ b/auth/macos/Runner/AppDelegate.swift
@@ -3,6 +3,13 @@ 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
}