mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 08:04:11 +08:00
Removing deprecated 'activate-with-no-open-windows' event
As mentioned on this Electron's issue: https://github.com/atom/electron/pull/2777 The 'activate-with-open-windows' event has been deprecated in favor of a global 'activate' event with a 'hasVisibleWindows' parameter. This fixes Nylas from crashing when closing the main window and opening via clicking the Dock icon.
This commit is contained in:
parent
2dea234de0
commit
048ac6a214
1 changed files with 3 additions and 2 deletions
|
@ -341,8 +341,9 @@ class Application
|
|||
# win = BrowserWindow.fromWebContents(event.sender)
|
||||
event.sender.send('inline-styles-result', {body, clientId})
|
||||
|
||||
app.on 'activate-with-no-open-windows', (event) =>
|
||||
@openWindowsForTokenState()
|
||||
app.on 'activate', (event, hasVisibleWindows) =>
|
||||
if not hasVisibleWindows
|
||||
@openWindowsForTokenState()
|
||||
event.preventDefault()
|
||||
|
||||
ipcMain.on 'update-application-menu', (event, template, keystrokesByCommand) =>
|
||||
|
|
Loading…
Reference in a new issue