mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Distributed Notifications
This commit is contained in:
parent
aa20aa51f4
commit
a2d18cda49
2 changed files with 40 additions and 0 deletions
|
|
@ -156,6 +156,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
}
|
||||
|
||||
func applicationWillTerminate(_ notification: Notification) {
|
||||
let userInfo: [String: Any] = [
|
||||
AtollDistributedNotifications.UserInfoKey.sourcePID: NSNumber(value: ProcessInfo.processInfo.processIdentifier)
|
||||
]
|
||||
DistributedNotificationCenter.default().postNotificationName(
|
||||
AtollDistributedNotifications.didBecomeIdle,
|
||||
object: nil,
|
||||
userInfo: userInfo,
|
||||
deliverImmediately: true
|
||||
)
|
||||
|
||||
// Cancel any pending window size updates
|
||||
windowSizeUpdateWorkItem?.cancel()
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
|
|
@ -393,6 +403,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||
}
|
||||
|
||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
let userInfo: [String: Any] = [
|
||||
AtollDistributedNotifications.UserInfoKey.sourcePID: NSNumber(value: ProcessInfo.processInfo.processIdentifier)
|
||||
]
|
||||
DistributedNotificationCenter.default().postNotificationName(
|
||||
AtollDistributedNotifications.didBecomeActive,
|
||||
object: nil,
|
||||
userInfo: userInfo,
|
||||
deliverImmediately: true
|
||||
)
|
||||
|
||||
LockScreenLiveActivityWindowManager.shared.configure(viewModel: vm)
|
||||
LockScreenManager.shared.configure(viewModel: vm)
|
||||
extensionXPCServiceHost.start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue