mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
fix(desktop): recover deep-link URL from argv on win/linux cold start
setupDeepLinks() only listened for second-instance and open-url events. On Windows/Linux a fresh launch via `surfsense://` delivers the URL in argv of the first instance, where it was silently dropped. Scan argv on setup so the existing handlePendingDeepLink() pass picks it up.
This commit is contained in:
parent
d97b2830c5
commit
6ee7c04d02
1 changed files with 5 additions and 0 deletions
|
|
@ -60,6 +60,11 @@ export function setupDeepLinks(): boolean {
|
|||
app.setAsDefaultProtocolClient(PROTOCOL);
|
||||
}
|
||||
|
||||
// Cold-start on Windows/Linux: protocol URL arrives via argv of the
|
||||
// first instance, not via `second-instance` or `open-url`.
|
||||
const cold = process.argv.find((arg) => arg.startsWith(`${PROTOCOL}://`));
|
||||
if (cold) handleDeepLink(cold);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue