fix: error when clicking LBRY URL when app is closed (https://github.com/lbryio/lbry-app/issues/1119)
Fix https://github.com/lbryio/lbry-app/issues/1119
This commit is contained in:
parent
034398859e
commit
e6e8218095
2 changed files with 9 additions and 2 deletions
|
@ -43,6 +43,8 @@ export default appState => {
|
|||
// - In a URI with a claim ID, like lbry://channel#claimid, Windows interprets the hash mark as
|
||||
// an anchor and converts it to lbry://channel/#claimid. We remove the slash here as well.
|
||||
deepLinkingURI = process.argv[1].replace(/\/$/, '').replace('/#', '#');
|
||||
} else if (process.platform === 'darwin') {
|
||||
deepLinkingURI = appState.macDeepLinkingURI;
|
||||
}
|
||||
|
||||
setupBarMenu();
|
||||
|
|
|
@ -110,8 +110,13 @@ app.on('will-finish-launching', () => {
|
|||
// Protocol handler for macOS
|
||||
app.on('open-url', (event, URL) => {
|
||||
event.preventDefault();
|
||||
rendererWindow.webContents.send('open-uri-requested', URL);
|
||||
rendererWindow.show();
|
||||
|
||||
if (rendererWindow) {
|
||||
rendererWindow.webContents.send('open-uri-requested', URL);
|
||||
rendererWindow.show();
|
||||
} else {
|
||||
appState.macDeepLinkingURI = URL;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue