mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 15:34:59 +01:00
Clear electron data when logging out (#578)
This commit is contained in:
parent
c560bb2de7
commit
18d80e4e9c
@ -55,6 +55,7 @@
|
|||||||
"@sentry/electron": "^4.3.0",
|
"@sentry/electron": "^4.3.0",
|
||||||
"auto-launch": "^5.0.5",
|
"auto-launch": "^5.0.5",
|
||||||
"counterpart": "^0.18.6",
|
"counterpart": "^0.18.6",
|
||||||
|
"electron-clear-data": "^1.0.5",
|
||||||
"electron-store": "^8.0.2",
|
"electron-store": "^8.0.2",
|
||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.6",
|
||||||
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker } from "electron";
|
import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker } from "electron";
|
||||||
|
import { relaunchApp } from "electron-clear-data";
|
||||||
|
|
||||||
import IpcMainEvent = Electron.IpcMainEvent;
|
import IpcMainEvent = Electron.IpcMainEvent;
|
||||||
import { recordSSOSession } from "./protocol";
|
import { recordSSOSession } from "./protocol";
|
||||||
@ -186,6 +187,13 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
|
|||||||
}));
|
}));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "clearStorage":
|
||||||
|
global.store.clear();
|
||||||
|
global.mainWindow.webContents.session.flushStorageData();
|
||||||
|
await global.mainWindow.webContents.session.clearStorageData();
|
||||||
|
relaunchApp();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
global.mainWindow.webContents.send("ipcReply", {
|
global.mainWindow.webContents.send("ipcReply", {
|
||||||
id: payload.id,
|
id: payload.id,
|
||||||
|
@ -4438,6 +4438,11 @@ electron-builder@^23.6.0:
|
|||||||
simple-update-notifier "^1.0.7"
|
simple-update-notifier "^1.0.7"
|
||||||
yargs "^17.5.1"
|
yargs "^17.5.1"
|
||||||
|
|
||||||
|
electron-clear-data@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron-clear-data/-/electron-clear-data-1.0.5.tgz#bc636f6850f57b1e8ed3fe2e57ca877e30d31bc9"
|
||||||
|
integrity sha512-vynYILZ2F+S5qnc81bnTOfh8uCVlxP6j42T7h/ELaDL+vxmlT1QNgte8KNuXb+s9ed+Qx4IIRbMRUcbAJa/8rA==
|
||||||
|
|
||||||
electron-devtools-installer@^3.1.1:
|
electron-devtools-installer@^3.1.1:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.2.0.tgz#acc48d24eb7033fe5af284a19667e73b78d406d0"
|
resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.2.0.tgz#acc48d24eb7033fe5af284a19667e73b78d406d0"
|
||||||
|
Loading…
Reference in New Issue
Block a user