From f402a631acbb9b0bbabc094984915abd145b9a2c Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Mon, 19 Aug 2024 22:15:53 +0200 Subject: [PATCH] ios: fix session csv download --- screens/MainScreen.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/screens/MainScreen.tsx b/screens/MainScreen.tsx index 5386c75..9dcec75 100644 --- a/screens/MainScreen.tsx +++ b/screens/MainScreen.tsx @@ -114,6 +114,10 @@ export default function MainScreen({ navigation }) { setIsConnected(false); }, []); + const onFileDownload = ({ nativeEvent: { downloadUrl } }) => { + if (downloadUrl) Linking.openURL(downloadUrl); + }; + const LoadingScreenMemoized = useMemo(() => , []); const LayoutMemoized = useMemo( @@ -142,6 +146,7 @@ export default function MainScreen({ navigation }) { onContentProcessDidTerminate={onTerminate} onMessage={handleMessage} onShouldStartLoadWithRequest={onShouldStartLoadWithRequest} + onFileDownload={onFileDownload} />