// Copyright © 2021 Encrypted Ink. All rights reserved. import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return false } func applicationDidFinishLaunching(_ aNotification: Notification) { Agent.shared.start() } func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool { // TODO: make sure it is called only when icon tapped Agent.shared.reopen() return true } }