mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-04 03:54:44 +00:00 
			
		
		
		
	* feat: hide application to tray macos * chore: enable reopen the app after closing it * fix: remove tray * fix: remove asset --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
		
			
				
	
	
		
			20 lines
		
	
	
		
			464 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			464 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
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)
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    return true
 | 
						|
  }
 | 
						|
}
 |