[Bootstrap] Add --url support (for protocol)
This commit is contained in:
parent
f34d8b8a76
commit
86b3f0992e
|
@ -138,6 +138,10 @@ const startUpdate = () => {
|
||||||
|
|
||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
|
app.on('second-instance', (e, a) => {
|
||||||
|
desktopCore?.handleOpenUrl?.(a.includes('--url') && a[a.indexOf('--') + 1]); // Change url of main window if protocol is used (uses like "discord --url -- discord://example")
|
||||||
|
});
|
||||||
|
|
||||||
if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) {
|
if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) {
|
||||||
log('Bootstrap', 'Non-first instance');
|
log('Bootstrap', 'Non-first instance');
|
||||||
return app.quit();
|
return app.quit();
|
||||||
|
|
Loading…
Reference in New Issue