mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-22 20:07:42 +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: () => {
|
click: () => {
|
||||||
mainWindow?.show();
|
if (mainWindow === null) createWindow(false);
|
||||||
createWinThumbarButtons();
|
else {
|
||||||
|
mainWindow.show();
|
||||||
|
createWinThumbarButtons();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
label: 'Open main window',
|
label: 'Open main window',
|
||||||
},
|
},
|
||||||
@@ -618,6 +621,7 @@ async function createWindow(first = true): Promise<void> {
|
|||||||
|
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
ipcMain.removeHandler('window-clear-cache');
|
ipcMain.removeHandler('window-clear-cache');
|
||||||
|
ipcMain.removeHandler('app-check-for-updates');
|
||||||
mainWindow = null;
|
mainWindow = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user