fix(window): recreate window on macos when closed but not quit

This commit is contained in:
Kendall Garner
2026-02-18 21:50:44 -08:00
parent 5039012fcb
commit 12ff690619
+6 -2
View File
@@ -390,8 +390,11 @@ const createTray = () => {
},
{
click: () => {
mainWindow?.show();
createWinThumbarButtons();
if (mainWindow === null) createWindow(false);
else {
mainWindow.show();
createWinThumbarButtons();
}
},
label: 'Open main window',
},
@@ -618,6 +621,7 @@ async function createWindow(first = true): Promise<void> {
mainWindow.on('closed', () => {
ipcMain.removeHandler('window-clear-cache');
ipcMain.removeHandler('app-check-for-updates');
mainWindow = null;
});