preferences page: Reflect changes in the preference page. (#362)

This updated the setting page if the sidebar was toggled using a shortcut.
This also updates the setting page if the tray was toggled using menu.

Fixes: #304.
This commit is contained in:
Priyank P
2017-12-27 10:36:32 -05:00
committed by Akash Nimare
parent a0d898a5b7
commit 231e7fd9c2
3 changed files with 26 additions and 0 deletions

View File

@@ -262,6 +262,13 @@ class ServerManagerView {
tabs: this.tabs,
activeTabIndex: this.activeTabIndex
});
ipcRenderer.on('toggle-sidebar', (event, state) => {
const selector = 'webview:not([class*=disabled])';
const webview = document.querySelector(selector);
const webContents = webview.getWebContents();
webContents.send('toggle-sidebar', state);
});
}
destroyTab(name, index) {