fix(desktop): keep window tabs across app close (#34807)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import Store from "electron-store"
|
||||
import electron from "electron"
|
||||
import { rmSync } from "node:fs"
|
||||
import { join } from "node:path"
|
||||
|
||||
import { SETTINGS_STORE } from "./store-keys"
|
||||
import { deleteStoreFileIfEmpty } from "./store-cleanup"
|
||||
@@ -26,3 +28,8 @@ export function getStore(name = SETTINGS_STORE) {
|
||||
export async function removeStoreFileIfEmpty(name: string) {
|
||||
if (await deleteStoreFileIfEmpty(electron.app.getPath("userData"), name)) cache.delete(name)
|
||||
}
|
||||
|
||||
export function removeStoreFile(name: string) {
|
||||
rmSync(join(electron.app.getPath("userData"), name), { force: true })
|
||||
cache.delete(name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user