From 54b7ce93087e1e3d85198f372291b0603659897b Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 15 Nov 2021 06:38:02 -0800 Subject: [PATCH] Add back support for flipper://welcome Summary: This was removed as part of the deeplink restructuring. Turns out this is actually useful in addition to the `flipper://` as some normalisation algos (notably VSCode's) remove the `//` otherwise. Reviewed By: nikoant Differential Revision: D32428872 fbshipit-source-id: ec89b1ab561504996da5d02521b91562245554a0 --- desktop/app/src/deeplink.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop/app/src/deeplink.tsx b/desktop/app/src/deeplink.tsx index 5440ecbb0..9ffcf1f05 100644 --- a/desktop/app/src/deeplink.tsx +++ b/desktop/app/src/deeplink.tsx @@ -43,8 +43,9 @@ export async function handleDeeplink( if (uri.protocol !== 'flipper:') { throw unknownError(); } - if (uri.href === 'flipper://') { - // We support an empty protocol for just opening Flipper from anywhere. + if (uri.href === 'flipper://' || uri.pathname === '//welcome') { + // We support an empty protocol for just opening Flipper from anywhere + // or alternatively flipper://welcome to open the welcome screen. return; } if (uri.href.startsWith('flipper://open-plugin')) {