mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-07-29 23:57:56 -05:00
ELECTRON-539 - Prevent multiple instance of notification configuration window (#423)
This commit is contained in:
committed by
Vishwas Shashidhar
parent
37194505bb
commit
af124e3aab
@@ -77,6 +77,16 @@ function getTemplatePath() {
|
||||
* @param windowName
|
||||
*/
|
||||
function openConfigurationWindow(windowName) {
|
||||
// This prevents creating multiple instances of the
|
||||
// notification configuration window
|
||||
if (configurationWindow && !configurationWindow.isDestroyed()) {
|
||||
if (configurationWindow.isMinimized()) {
|
||||
configurationWindow.restore();
|
||||
}
|
||||
configurationWindow.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
const allWindows = BrowserWindow.getAllWindows();
|
||||
const selectedParentWindow = allWindows.find((window) => { return window.winName === windowName });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user