From 676e6269e72f5e3ab4f394ca6cc0296945fe5210 Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 10 Oct 2024 09:15:24 -0700 Subject: [PATCH] Show download button for Apple (#5671) --- src/screens/StarterPack/StarterPackLandingScreen.tsx | 2 +- src/view/com/auth/SplashScreen.web.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/screens/StarterPack/StarterPackLandingScreen.tsx b/src/screens/StarterPack/StarterPackLandingScreen.tsx index 86ff5976ee..ec31fc21d0 100644 --- a/src/screens/StarterPack/StarterPackLandingScreen.tsx +++ b/src/screens/StarterPack/StarterPackLandingScreen.tsx @@ -47,7 +47,7 @@ interface AppClipMessage { jsonToStore?: string } -function postAppClipMessage(message: AppClipMessage) { +export function postAppClipMessage(message: AppClipMessage) { // @ts-expect-error safari webview only window.webkit.messageHandlers.onMessage.postMessage(JSON.stringify(message)) } diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx index a850ea80a2..e8a7c7373f 100644 --- a/src/view/com/auth/SplashScreen.web.tsx +++ b/src/view/com/auth/SplashScreen.web.tsx @@ -9,7 +9,10 @@ import {useKawaiiMode} from '#/state/preferences/kawaii' import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' import {Logo} from '#/view/icons/Logo' import {Logotype} from '#/view/icons/Logotype' -import {AppClipOverlay} from '#/screens/StarterPack/StarterPackLandingScreen' +import { + AppClipOverlay, + postAppClipMessage, +} from '#/screens/StarterPack/StarterPackLandingScreen' import {atoms as a, useTheme} from '#/alf' import {AppLanguageDropdown} from '#/components/AppLanguageDropdown' import {Button, ButtonText} from '#/components/Button' @@ -36,6 +39,9 @@ export const SplashScreen = ({ const clip = getParams.get('clip') if (clip === 'true') { setShowClipOverlay(true) + postAppClipMessage({ + action: 'present', + }) } }, [])