mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
change show logic to same as that of the tray icon
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
8b4ab4bcdd
commit
2139fb74bb
1 changed files with 6 additions and 5 deletions
|
@ -106,13 +106,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
notification.onclick = function() {
|
||||
dis.dispatch({
|
||||
action: 'view_room',
|
||||
room_id: room.roomId
|
||||
room_id: room.roomId,
|
||||
});
|
||||
global.focus();
|
||||
const currentWin = electron.remote.getCurrentWindow();
|
||||
currentWin.show();
|
||||
currentWin.restore();
|
||||
currentWin.focus();
|
||||
const win = electron.remote.getCurrentWindow();
|
||||
|
||||
if (win.isMinimized()) win.restore();
|
||||
else if (!win.isVisible()) win.show();
|
||||
else win.focus();
|
||||
};
|
||||
|
||||
return notification;
|
||||
|
|
Loading…
Reference in a new issue