mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 13:03:22 +00:00
preference: Unify duplicate toggle-menubar-setting event.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -73,7 +73,6 @@ export interface RendererMessage {
|
|||||||
updateMenu: boolean,
|
updateMenu: boolean,
|
||||||
) => void;
|
) => void;
|
||||||
"toggle-dnd": (state: boolean, newSettings: Partial<DNDSettings>) => void;
|
"toggle-dnd": (state: boolean, newSettings: Partial<DNDSettings>) => void;
|
||||||
"toggle-menubar-setting": (state: boolean) => void;
|
|
||||||
"toggle-sidebar": (show: boolean) => void;
|
"toggle-sidebar": (show: boolean) => void;
|
||||||
"toggle-sidebar-setting": (state: boolean) => void;
|
"toggle-sidebar-setting": (state: boolean) => void;
|
||||||
"toggle-silent": (state: boolean) => void;
|
"toggle-silent": (state: boolean) => void;
|
||||||
|
|||||||
@@ -1028,7 +1028,11 @@ class ServerManagerView {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateGeneralSettings("toggle-menubar-setting", autoHideMenubar);
|
this.updateGeneralSettings(
|
||||||
|
"toggle-autohide-menubar",
|
||||||
|
autoHideMenubar,
|
||||||
|
updateMenu,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export class PreferenceView {
|
|||||||
|
|
||||||
ipcRenderer.on("switch-settings-nav", this.handleSwitchSettingsNav);
|
ipcRenderer.on("switch-settings-nav", this.handleSwitchSettingsNav);
|
||||||
ipcRenderer.on("toggle-sidebar-setting", this.handleToggleSidebar);
|
ipcRenderer.on("toggle-sidebar-setting", this.handleToggleSidebar);
|
||||||
ipcRenderer.on("toggle-menubar-setting", this.handleToggleMenubar);
|
ipcRenderer.on("toggle-autohide-menubar", this.handleToggleMenubar);
|
||||||
ipcRenderer.on("toggle-tray", this.handleToggleTray);
|
ipcRenderer.on("toggle-tray", this.handleToggleTray);
|
||||||
ipcRenderer.on("toggle-dnd", this.handleToggleDnd);
|
ipcRenderer.on("toggle-dnd", this.handleToggleDnd);
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ export class PreferenceView {
|
|||||||
destroy(): void {
|
destroy(): void {
|
||||||
ipcRenderer.off("switch-settings-nav", this.handleSwitchSettingsNav);
|
ipcRenderer.off("switch-settings-nav", this.handleSwitchSettingsNav);
|
||||||
ipcRenderer.off("toggle-sidebar-setting", this.handleToggleSidebar);
|
ipcRenderer.off("toggle-sidebar-setting", this.handleToggleSidebar);
|
||||||
ipcRenderer.off("toggle-menubar-setting", this.handleToggleMenubar);
|
ipcRenderer.off("toggle-autohide-menubar", this.handleToggleMenubar);
|
||||||
ipcRenderer.off("toggle-tray", this.handleToggleTray);
|
ipcRenderer.off("toggle-tray", this.handleToggleTray);
|
||||||
ipcRenderer.off("toggle-dnd", this.handleToggleDnd);
|
ipcRenderer.off("toggle-dnd", this.handleToggleDnd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user