mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-03 21:43:18 +00:00
@@ -77,13 +77,17 @@ class PreferenceView extends BaseComponent {
|
|||||||
ipcRenderer.on('toggle-sidebar', (event, state) => {
|
ipcRenderer.on('toggle-sidebar', (event, state) => {
|
||||||
const inputSelector = '#sidebar-option .action .switch input';
|
const inputSelector = '#sidebar-option .action .switch input';
|
||||||
const input = document.querySelector(inputSelector);
|
const input = document.querySelector(inputSelector);
|
||||||
input.checked = state;
|
if (input) {
|
||||||
|
input.checked = state;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcRenderer.on('toggletray', (event, state) => {
|
ipcRenderer.on('toggletray', (event, state) => {
|
||||||
const inputSelector = '#tray-option .action .switch input';
|
const inputSelector = '#tray-option .action .switch input';
|
||||||
const input = document.querySelector(inputSelector);
|
const input = document.querySelector(inputSelector);
|
||||||
input.checked = state;
|
if (input) {
|
||||||
|
input.checked = state;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user