mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 03:03:41 +00:00
Mac 触发升级时跳动Dock图标
This commit is contained in:
parent
74b1f65e0f
commit
8b394819c4
6
electron/electron.js
vendored
6
electron/electron.js
vendored
@ -385,7 +385,7 @@ ipcMain.on('sendForwardMain', (event, args) => {
|
|||||||
* @param args
|
* @param args
|
||||||
*/
|
*/
|
||||||
ipcMain.on('setDockBadge', (event, args) => {
|
ipcMain.on('setDockBadge', (event, args) => {
|
||||||
if(process.platform !== 'darwin'){
|
if (process.platform !== 'darwin') {
|
||||||
// Mac only
|
// Mac only
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -452,6 +452,10 @@ ipcMain.on('updateCheckAndDownload', (event, args) => {
|
|||||||
ipcMain.on('updateQuitAndInstall', (event) => {
|
ipcMain.on('updateQuitAndInstall', (event) => {
|
||||||
event.returnValue = "ok"
|
event.returnValue = "ok"
|
||||||
willQuitApp = true
|
willQuitApp = true
|
||||||
|
if(process.platform == 'darwin'){
|
||||||
|
// Mac 触发升级时跳动Dock图标
|
||||||
|
app.dock.bounce('critical');
|
||||||
|
}
|
||||||
setTimeout(() => autoUpdater.quitAndInstall(true, true), 1)
|
setTimeout(() => autoUpdater.quitAndInstall(true, true), 1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user