mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-10 05:06:07 +08:00
fix(notifs): Hopefully prevent gc of NodeObjC objects
This commit is contained in:
parent
e313521197
commit
408e96945c
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,10 @@ class NativeNotificationManagerMacOSX
|
||||||
@_delegate = Delegate('alloc')('init')
|
@_delegate = Delegate('alloc')('init')
|
||||||
@_center('setDelegate', @_delegate)
|
@_center('setDelegate', @_delegate)
|
||||||
|
|
||||||
|
# Ensure that these objects are never, ever garbage collected
|
||||||
|
global.__nativeNotificationManagerMacOSXDelegate = Delegate
|
||||||
|
global.__nativeNotificationManagerMacOSX = @
|
||||||
|
|
||||||
ipc.on('fire-native-notification', @onFireNotification)
|
ipc.on('fire-native-notification', @onFireNotification)
|
||||||
|
|
||||||
shouldPresentNotification: (self, _cmd, center, notif) =>
|
shouldPresentNotification: (self, _cmd, center, notif) =>
|
||||||
|
|
Loading…
Add table
Reference in a new issue