Fix clear storage not working
It failed because it went looking for the focused / first window to clear the storage on, but we called it before we had a window. Just rewrite it without electron-clear-storage which doesn't really seem necessary as a dependency, and also relaunched the app when clearing stprage (you-had-one-job.gif). Pass the session in explicitly so it's clear it needs it.
This commit is contained in:
+1
-1
@@ -174,7 +174,7 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
|
||||
break;
|
||||
|
||||
case "clearStorage":
|
||||
await clearDataAndRelaunch();
|
||||
await clearDataAndRelaunch(global.mainWindow.webContents.session);
|
||||
return; // the app is about to stop, we don't need to reply to the IPC
|
||||
|
||||
case "breadcrumbs": {
|
||||
|
||||
Reference in New Issue
Block a user