show open in app nag always

This commit is contained in:
Sean Yesmunt 2020-03-26 10:40:32 -04:00
parent 46cc15a1cc
commit 3f08786514

View file

@ -37,6 +37,7 @@ function OpenInAppLink(props: Props) {
isDesktopUser = true; isDesktopUser = true;
} }
}); });
const isWebUserOnly = !isAndroidUser && !isDesktopUser; const isWebUserOnly = !isAndroidUser && !isDesktopUser;
let appLink = uri; let appLink = uri;
@ -58,12 +59,12 @@ function OpenInAppLink(props: Props) {
}, [hasSrcParam, search, pathname, replace]); }, [hasSrcParam, search, pathname, replace]);
React.useEffect(() => { React.useEffect(() => {
if (hasSrcParam && ((!showNag && isAndroidUser && isAndroidDevice) || (isDesktopUser && isDesktopDevice))) { if ((isAndroidUser && isAndroidDevice) || (isDesktopUser && isDesktopDevice)) {
setShowNag(true); setShowNag(true);
} }
// Don't pass hasSrcParam into this effect because we only want the initial value // Don't pass showNag into this effect because we only want the initial value
// If the param is removed from the url, the nag should still be shown // If the param is removed from the url, the nag should still be shown
}, [showNag, setShowNag, isAndroidUser, isDesktopUser]); }, [setShowNag, isAndroidUser, isDesktopUser]);
if (!showNag || isWebUserOnly) { if (!showNag || isWebUserOnly) {
return null; return null;