diff options
author | André Oliveira <oliveira.andrerodrigues95@gmail.com> | 2022-07-28 10:11:04 +0100 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-07-29 07:41:26 +0530 |
commit | 36822a25fa1f978c4dc06743600cc51bf774d4ea (patch) | |
tree | a76c7cc42177956f402d216e17e2bc7a9e6b6fe5 /src/index.ts | |
parent | fix: maximize window after tray clicking (diff) | |
download | ferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.tar.gz ferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.tar.zst ferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.zip |
fix: handleDeepLink generalization
Diffstat (limited to 'src/index.ts')
-rw-r--r-- | src/index.ts | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/index.ts b/src/index.ts index 9a1163067..05e222a25 100644 --- a/src/index.ts +++ b/src/index.ts | |||
@@ -119,9 +119,7 @@ if (!gotTheLock) { | |||
119 | onDidLoad((window: BrowserWindow) => { | 119 | onDidLoad((window: BrowserWindow) => { |
120 | // Keep only command line / deep linked arguments | 120 | // Keep only command line / deep linked arguments |
121 | const url = argv.slice(1); | 121 | const url = argv.slice(1); |
122 | if (url) { | 122 | handleDeepLink(window, url.toString()); |
123 | handleDeepLink(window, url.toString()); | ||
124 | } | ||
125 | 123 | ||
126 | if (argv.includes('--reset-window')) { | 124 | if (argv.includes('--reset-window')) { |
127 | // Needs to be delayed to not interfere with mainWindow.restore(); | 125 | // Needs to be delayed to not interfere with mainWindow.restore(); |
@@ -270,14 +268,7 @@ const createWindow = () => { | |||
270 | if (isWindows) { | 268 | if (isWindows) { |
271 | onDidLoad((window: BrowserWindow) => { | 269 | onDidLoad((window: BrowserWindow) => { |
272 | const url = process.argv.slice(1); | 270 | const url = process.argv.slice(1); |
273 | if ( | 271 | handleDeepLink(window, url.toString()); |
274 | url && | ||
275 | // The next line is a workaround after this 71c5237 [chore: Mobx & React-Router upgrade (#406)]. | ||
276 | // For some reason, the app won't start until because it's trying to route to './build'. | ||
277 | url.toString() !== './build' | ||
278 | ) { | ||
279 | handleDeepLink(window, url.toString()); | ||
280 | } | ||
281 | }); | 272 | }); |
282 | } | 273 | } |
283 | 274 | ||