1
0
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:
2020-07-16 22:25:31 +02:00
parent 33825e7b66
commit 5d69b423c1
4 changed files with 37 additions and 1 deletions

View File

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