Windows: Reintroduce flash frame when we trigger a notification
This commit is contained in:
parent
e011589a5e
commit
5bd9964ed2
3 changed files with 13 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
/* global Signal:false */
|
||||
/* global Backbone: false */
|
||||
|
||||
/* global drawAttention: false */
|
||||
/* global i18n: false */
|
||||
/* global isFocused: false */
|
||||
/* global Signal: false */
|
||||
|
@ -135,6 +136,8 @@
|
|||
message = i18n('newMessage');
|
||||
}
|
||||
|
||||
drawAttention();
|
||||
|
||||
this.lastNotification = new Notification(title, {
|
||||
body: window.platform === 'linux' ? filter(message) : message,
|
||||
icon: iconUrl,
|
||||
|
|
6
main.js
6
main.js
|
@ -890,6 +890,12 @@ ipc.on('add-setup-menu-items', () => {
|
|||
});
|
||||
});
|
||||
|
||||
ipc.on('draw-attention', () => {
|
||||
if (process.platform === 'win32' && mainWindow) {
|
||||
mainWindow.flashFrame(true);
|
||||
}
|
||||
});
|
||||
|
||||
ipc.on('restart', () => {
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
|
|
|
@ -90,6 +90,10 @@ window.open = () => null;
|
|||
// eslint-disable-next-line no-eval, no-multi-assign
|
||||
window.eval = global.eval = () => null;
|
||||
|
||||
window.drawAttention = () => {
|
||||
window.log.info('draw attention');
|
||||
ipc.send('draw-attention');
|
||||
};
|
||||
window.showWindow = () => {
|
||||
window.log.info('show window');
|
||||
ipc.send('show-window');
|
||||
|
|
Loading…
Add table
Reference in a new issue