Fixes to electron desktop notifs
Merge the notification part of https://github.com/vector-im/riot-web/pull/2960 * Show and focus the window when the notification is clicked, rather than just restoring it. * Implement requestNotificationPermission and return a resolved promise (although in practice it should never be called)
This commit is contained in:
parent
231adbcd31
commit
bee4ca2b28
|
@ -97,7 +97,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
room_id: room.roomId
|
room_id: room.roomId
|
||||||
});
|
});
|
||||||
global.focus();
|
global.focus();
|
||||||
electron.remote.getCurrentWindow().restore();
|
const currentWin = electron.remote.getCurrentWindow();
|
||||||
|
currentWin.show();
|
||||||
|
currentWin.restore();
|
||||||
|
currentWin.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
|
@ -131,4 +134,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
screenCaptureErrorString() {
|
screenCaptureErrorString() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
requestNotificationPermission() : Promise {
|
||||||
|
return q('granted');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue