mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-09 04:42:59 +02:00
🚧 WIP: Notify the user about PHP switch completion (#15)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
import UserNotifications
|
||||
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@@ -27,8 +28,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
|
||||
// MARK: - Lifecycle
|
||||
|
||||
|
||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
||||
NSUserNotificationCenter.default.delegate = self
|
||||
self.menu.startup()
|
||||
}
|
||||
|
||||
@@ -37,3 +39,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate: NSUserNotificationCenterDelegate {
|
||||
func userNotificationCenter(_ center: NSUserNotificationCenter,
|
||||
shouldPresent notification: NSUserNotification) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user