aboutsummaryrefslogtreecommitdiffstats
path: root/src/electron
diff options
context:
space:
mode:
authorLibravatar André Oliveira <oliveira.andrerodrigues95@gmail.com>2022-07-28 10:11:04 +0100
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-07-29 07:41:26 +0530
commit36822a25fa1f978c4dc06743600cc51bf774d4ea (patch)
treea76c7cc42177956f402d216e17e2bc7a9e6b6fe5 /src/electron
parentfix: maximize window after tray clicking (diff)
downloadferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.tar.gz
ferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.tar.zst
ferdium-app-36822a25fa1f978c4dc06743600cc51bf774d4ea.zip
fix: handleDeepLink generalization
Diffstat (limited to 'src/electron')
-rw-r--r--src/electron/deepLinking.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/electron/deepLinking.ts b/src/electron/deepLinking.ts
index 36de1b143..104aa2d83 100644
--- a/src/electron/deepLinking.ts
+++ b/src/electron/deepLinking.ts
@@ -4,9 +4,18 @@ export default function handleDeepLink(
4 window: BrowserWindow, 4 window: BrowserWindow,
5 rawUrl: string, 5 rawUrl: string,
6): void { 6): void {
7 if (!rawUrl) {
8 return;
9 }
10
7 const url = rawUrl.replace('ferdium://', ''); 11 const url = rawUrl.replace('ferdium://', '');
8 12
9 if (!url) return; 13 // The next line is a workaround after this 71c5237 [chore: Mobx & React-Router upgrade (#406)].
14 // For some reason, the app won't start until because it's trying to route to './build'.
15 // TODO: Check what is wrong with DeepLinking - it is broken for some reason. This is causing several troubles.
16 const workaroundDeepLink = ['./build', '--allow-file-access-from-files'];
17
18 if (!url || workaroundDeepLink.includes(url)) return;
10 19
11 window.webContents.send('navigateFromDeepLink', { url }); 20 window.webContents.send('navigateFromDeepLink', { url });
12} 21}