Merge branch 'longle255-fix_loading_help_menu'

This commit is contained in:
Jeremy Kauffman 2017-06-13 15:59:10 -04:00
commit 84589f1ebb
3 changed files with 9 additions and 3 deletions

View file

@ -16,7 +16,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
*
### Fixed
*
* Fix help menu force reloading whole app
*
### Deprecated

View file

@ -36,7 +36,7 @@ const baseTemplate = [
label: 'Help',
click(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.loadURL(`file://${__dirname}/../dist/index.html?help`);
focusedWindow.webContents.send('open-menu', '/help');
}
}
}

View file

@ -49,6 +49,12 @@ ipcRenderer.on("open-uri-requested", (event, uri) => {
}
});
ipcRenderer.on("open-menu", (event, uri) => {
if (uri && uri.startsWith("/help")) {
app.store.dispatch(doNavigate("/help"));
}
});
document.addEventListener("click", event => {
var target = event.target;
while (target && target !== document) {