From e05484bba65205f71a1bee7f47876b270448dce7 Mon Sep 17 00:00:00 2001 From: Developer Date: Fri, 20 Mar 2026 15:45:49 +0800 Subject: [PATCH] feat: add browser download option to update dialog --- hooks/useCheckUpdate.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hooks/useCheckUpdate.ts b/hooks/useCheckUpdate.ts index 42e6fc3..4d90a71 100644 --- a/hooks/useCheckUpdate.ts +++ b/hooks/useCheckUpdate.ts @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { Alert, Platform } from 'react-native'; +import { Alert, Linking, Platform } from 'react-native'; import * as FileSystem from 'expo-file-system/legacy'; import * as IntentLauncher from 'expo-intent-launcher'; import Constants from 'expo-constants'; @@ -48,7 +48,11 @@ export function useCheckUpdate() { [ { text: '取消', style: 'cancel' }, { - text: '下载安装', + text: '浏览器下载', + onPress: () => Linking.openURL(downloadUrl), + }, + { + text: '应用内下载', onPress: () => downloadAndInstall(downloadUrl, latestVersion), }, ]