Use Single Instance App mode on Linux

This Electron feature now works on Linux again as of Electron 1.7.8.

Fixes #164 (multiple windows opening on Linux when clicking lbry://
links)
This commit is contained in:
Alex Liebowitz 2017-10-12 18:04:31 -04:00
parent 992c9d16a3
commit c9bd5ad488

View file

@ -227,9 +227,6 @@ function quitNow() {
app.quit();
}
if (process.platform != 'linux') {
// On Linux, this is always returning true due to an Electron bug,
// so for now we just don't support single-instance apps on Linux.
const isSecondaryInstance = app.makeSingleInstance((argv) => {
if (argv.length >= 2) {
handleOpenUriRequested(argv[1]); // This will handle restoring and focusing the window
@ -245,7 +242,6 @@ if (process.platform != 'linux') {
quitNow();
return;
}
}
app.on('ready', function(){
launchDaemonIfNotRunning();