Fix clicking on notifications
* Dismiss the notification when it's clicked * Accept the room object: we need it to view_room * Desktop app: Un-minimise when notification clicked * Desktop App: Set App User Model ID so notifications work on Windows 8!
This commit is contained in:
@@ -79,7 +79,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
return true;
|
||||
}
|
||||
|
||||
displayNotification(title: string, msg: string, avatarUrl: string): Notification {
|
||||
displayNotification(title: string, msg: string, avatarUrl: string, room: Object): Notification {
|
||||
// Notifications in Electron use the HTML5 notification API
|
||||
const notification = new global.Notification(
|
||||
title,
|
||||
@@ -97,6 +97,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
room_id: room.roomId
|
||||
});
|
||||
global.focus();
|
||||
electron.remote.getCurrentWindow().restore();
|
||||
};
|
||||
|
||||
return notification;
|
||||
|
||||
Reference in New Issue
Block a user