1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Resolves #12572: Click on systray icon will show/hide Joplin main window (#13299)

Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
This commit is contained in:
trap000d
2025-10-01 05:05:44 +13:00
committed by GitHub
parent 14b56f19df
commit fd2b22ed68

View File

@@ -622,7 +622,11 @@ export default class ElectronAppWrapper {
console.warn('The window object was not available during the click event from tray icon'); console.warn('The window object was not available during the click event from tray icon');
return; return;
} }
this.mainWindow().show(); if (!this.mainWindow().isVisible()) {
this.mainWindow().show();
} else {
this.mainWindow().hide();
}
}); });
} catch (error) { } catch (error) {
console.error('Cannot create tray', error); console.error('Cannot create tray', error);