fix: fixing stale state

This commit is contained in:
Chubby Granny Chaser 2025-02-16 05:18:08 +00:00
parent 9449d7cdcd
commit 484fa863dc
No known key found for this signature in database
17 changed files with 50 additions and 90 deletions

View file

@ -355,11 +355,13 @@ contextBridge.exposeInMainWorld("electron", {
deleteAllCustomThemes: () => ipcRenderer.invoke("deleteAllCustomThemes"),
deleteCustomTheme: (themeId: string) =>
ipcRenderer.invoke("deleteCustomTheme", themeId),
updateCustomTheme: (themeId: string, theme: Theme) =>
ipcRenderer.invoke("updateCustomTheme", themeId, theme),
updateCustomTheme: (themeId: string, code: string) =>
ipcRenderer.invoke("updateCustomTheme", themeId, code),
getCustomThemeById: (themeId: string) =>
ipcRenderer.invoke("getCustomThemeById", themeId),
getActiveCustomTheme: () => ipcRenderer.invoke("getActiveCustomTheme"),
toggleCustomTheme: (themeId: string, isActive: boolean) =>
ipcRenderer.invoke("toggleCustomTheme", themeId, isActive),
onImportTheme: (cb: (theme: string, author: string) => void) => {
const listener = (
_event: Electron.IpcRendererEvent,