[MM-52984] Fix minimized window not showing when clicking the notification (#2745)
* Fix minimized window not showing when clicking the notification * Fix tests
This commit is contained in:
parent
90b4489053
commit
1db2828a93
|
@ -86,6 +86,7 @@ jest.mock('../views/viewManager', () => ({
|
|||
}));
|
||||
jest.mock('../windows/mainWindow', () => ({
|
||||
get: jest.fn(),
|
||||
show: jest.fn(),
|
||||
sendToRenderer: jest.fn(),
|
||||
}));
|
||||
|
||||
|
@ -244,6 +245,7 @@ describe('main/notifications', () => {
|
|||
);
|
||||
const mention = mentions.find((m) => m.body === 'mention_click_body');
|
||||
mention.value.click();
|
||||
expect(MainWindow.show).toHaveBeenCalled();
|
||||
expect(ViewManager.showById).toHaveBeenCalledWith('server_id');
|
||||
});
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@ export function displayMention(title: string, body: string, channel: {id: string
|
|||
|
||||
mention.on('click', () => {
|
||||
log.debug('notification click', serverName, mention);
|
||||
MainWindow.show();
|
||||
if (serverName) {
|
||||
ViewManager.showById(view.id);
|
||||
webcontents.send('notification-clicked', {channel, teamId, url});
|
||||
|
|
Loading…
Reference in a new issue