Forward clearElectronStore

This commit is contained in:
Manav Rathi 2024-03-16 18:00:41 +05:30
parent 3ce8513e48
commit 83477cfe37
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View file

@ -34,7 +34,6 @@ import * as fs from "promise-fs";
import { Readable } from "stream";
import { deleteDiskCache, openDiskCache } from "./api/cache";
import { logToDisk, openLogDirectory } from "./api/common";
import { clearElectronStore } from "./api/electronStore";
import {
checkExistsAndCreateDir,
exists,
@ -332,6 +331,12 @@ const openDirectory = async (dirPath: string): Promise<void> => {
// -
const clearElectronStore = () => {
ipcRenderer.send("clear-electron-store");
};
// -
const updateAndRestart = () => {
ipcRenderer.send("update-and-restart");
};

View file

@ -9,6 +9,7 @@ import {
Tray,
} from "electron";
import path from "path";
import { clearElectronStore } from "../api/electronStore";
import {
getAppVersion,
muteUpdateNotification,
@ -90,6 +91,10 @@ export default function setupIpcComs(
return safeStorage.decryptString(message);
});
ipcMain.on("clear-electron-store", () => {
clearElectronStore();
});
ipcMain.handle("get-path", (_, message) => {
// By default, these paths are at the following locations:
//