[MM-40574] Fix for race condition where new server modal didn't show initially on Linux, resizing issues (#1865)
* FIx for linux modal sizing * Fix race condition, merge'd
This commit is contained in:
@@ -76,6 +76,19 @@ export function handleOpenTab(event: IpcMainEvent, serverName: string, tabName:
|
||||
Config.set('teams', teams);
|
||||
}
|
||||
|
||||
export function addNewServerModalWhenMainWindowIsShown() {
|
||||
const mainWindow = WindowManager.getMainWindow();
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isVisible()) {
|
||||
handleNewServerModal();
|
||||
} else {
|
||||
mainWindow.once('show', () => {
|
||||
handleNewServerModal();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function handleNewServerModal() {
|
||||
const html = getLocalURLString('newServer.html');
|
||||
|
||||
|
Reference in New Issue
Block a user