fix(updater): gate cached updates on semver and confirm offers before installing

This commit is contained in:
Tunglies
2026-11-26 23:55:45 +08:00
parent 2905b0a194
commit ed53d19fb1
12 changed files with 104 additions and 158 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { fetchCacheData, setCacheData, useQuery } from '@/services/query-client'
import { checkUpdateSafe } from '@/services/update'
import { checkForUpdate } from '@/services/update'
import { useVerge } from './use-verge'
@@ -26,7 +26,7 @@ export const useUpdate = (enabled: boolean = true) => {
const shouldCheck = enabled && auto_check_update !== false
const fetchUpdate = async () => {
const result = await checkUpdateSafe()
const result = await checkForUpdate()
updateLastCheckTime()
return result
}