mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
refactor: simplify theme import handling and remove redundant code
This commit is contained in:
parent
ef28337729
commit
569c80cbf4
9 changed files with 53 additions and 85 deletions
|
@ -362,15 +362,6 @@ contextBridge.exposeInMainWorld("electron", {
|
|||
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,
|
||||
theme: string,
|
||||
author: string
|
||||
) => cb(theme, author);
|
||||
ipcRenderer.on("import-theme", listener);
|
||||
return () => ipcRenderer.removeListener("import-theme", listener);
|
||||
},
|
||||
|
||||
/* Editor */
|
||||
openEditorWindow: (themeId: string) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue