AppFlowy/frontend/appflowy_flutter/macos/Runner/AppDelegate.swift

20 lines
464 B
Swift
Raw Normal View History

2021-06-19 15:41:19 +00:00
import Cocoa
import FlutterMacOS
@NSApplicationMain
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return false
}
override func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {
if !flag {
for window in sender.windows {
window.makeKeyAndOrderFront(self)
}
}
2021-06-19 15:41:19 +00:00
return true
}
}