Skip to content

Commit 686a3c6

Browse files
authored
Merge pull request element-hq#2994 from vector-im/dbkr/carlos22_notif_fixes
Fixes to electron desktop notifs
2 parents 231adbc + bee4ca2 commit 686a3c6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/vector/platform/ElectronPlatform.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export default class ElectronPlatform extends VectorBasePlatform {
9797
room_id: room.roomId
9898
});
9999
global.focus();
100-
electron.remote.getCurrentWindow().restore();
100+
const currentWin = electron.remote.getCurrentWindow();
101+
currentWin.show();
102+
currentWin.restore();
103+
currentWin.focus();
101104
};
102105

103106
return notification;
@@ -131,4 +134,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
131134
screenCaptureErrorString() {
132135
return null;
133136
}
137+
138+
requestNotificationPermission() : Promise {
139+
return q('granted');
140+
}
134141
}

0 commit comments

Comments
 (0)