mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Move open-url handling to first instance block
This commit is contained in:
+8
-12
@@ -270,6 +270,14 @@ if (!process.mas) {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
app.on('open-url', (event, incomingHref) => {
|
||||
event.preventDefault();
|
||||
const route = parseSignalRoute(incomingHref);
|
||||
if (route != null) {
|
||||
handleSignalRoute(route);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
/* eslint-enable no-console */
|
||||
@@ -2244,18 +2252,6 @@ app.on(
|
||||
app.setAsDefaultProtocolClient('sgnl');
|
||||
app.setAsDefaultProtocolClient('signalcaptcha');
|
||||
|
||||
app.on('will-finish-launching', () => {
|
||||
// open-url must be set from within will-finish-launching for macOS
|
||||
// https://stackoverflow.com/a/43949291
|
||||
app.on('open-url', (event, incomingHref) => {
|
||||
event.preventDefault();
|
||||
const route = parseSignalRoute(incomingHref);
|
||||
if (route != null) {
|
||||
handleSignalRoute(route);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on(
|
||||
'set-badge',
|
||||
(_event: Electron.Event, badge: number | 'marked-unread') => {
|
||||
|
||||
Reference in New Issue
Block a user