mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04: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
@ -106,13 +106,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||||||
notification.onclick = function() {
|
notification.onclick = function() {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: room.roomId
|
room_id: room.roomId,
|
||||||
});
|
});
|
||||||
global.focus();
|
global.focus();
|
||||||
const currentWin = electron.remote.getCurrentWindow();
|
const win = electron.remote.getCurrentWindow();
|
||||||
currentWin.show();
|
|
||||||
currentWin.restore();
|
if (win.isMinimized()) win.restore();
|
||||||
currentWin.focus();
|
else if (!win.isVisible()) win.show();
|
||||||
|
else win.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
|
Loading…
Reference in New Issue
Block a user