mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-29 00:40:18 +08:00
refactor(updater): drop the never-matching break-change gate (#8742)
This commit is contained in:
@@ -306,19 +306,8 @@ export function UpdateViewer({ ref }: { ref?: Ref<UpdateViewerRef> }) {
|
||||
return updateInfo?.body
|
||||
}, [activeLanguage, t, updateInfo])
|
||||
|
||||
const breakChangeFlag = useMemo(() => {
|
||||
if (!updateInfo?.body) {
|
||||
return false
|
||||
}
|
||||
return updateInfo?.body.toLowerCase().includes('break change')
|
||||
}, [updateInfo])
|
||||
|
||||
const onUpdate = useLockFn(async () => {
|
||||
if (!updateInfo?.body) return
|
||||
if (breakChangeFlag) {
|
||||
showNotice.error('settings.modals.update.messages.breakChangeError')
|
||||
return
|
||||
}
|
||||
if (updateState) return
|
||||
setUpdateState(true)
|
||||
setDownload({ downloaded: 0, total: 0 })
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
} from '@/services/cmds'
|
||||
import { mutate } from '@/services/mutate'
|
||||
import { showNotice } from '@/services/notice-service'
|
||||
import { checkUpdateSafe as checkUpdate } from '@/services/update'
|
||||
import { checkForUpdate as checkUpdate } from '@/services/update'
|
||||
import { version } from '@root/package.json'
|
||||
|
||||
import { BackupViewer } from './mods/backup-viewer'
|
||||
|
||||
Reference in New Issue
Block a user