mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
fix(window): recreate window on macos when closed but not quit
This commit is contained in:
+6
-2
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user