tokenary/Encrypted Ink/AppDelegate.swift
2021-06-13 06:30:20 +03:00

23 lines
610 B
Swift

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