mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 12:50:48 +00:00
feat: window客户端任务栏闪烁
This commit is contained in:
parent
b47b3b4b3a
commit
473eaa040f
10
electron/electron.js
vendored
10
electron/electron.js
vendored
@ -391,10 +391,18 @@ ipcMain.on('sendForwardMain', (event, args) => {
|
||||
})
|
||||
|
||||
/**
|
||||
* 设置Dock标记
|
||||
* 设置Dock标记(window闪烁、macos标记)
|
||||
* @param args
|
||||
*/
|
||||
ipcMain.on('setDockBadge', (event, args) => {
|
||||
if (process.platform === 'win32') {
|
||||
// Window flash
|
||||
if (!mainWindow.isFocused()) {
|
||||
mainWindow.once('focus', () => mainWindow.flashFrame(false))
|
||||
mainWindow.flashFrame(true)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (process.platform !== 'darwin') {
|
||||
// Mac only
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user