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}
/>