mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-14 22:10:32 +08:00
fix(home): update last check timestamp on manual update check (#6605)
The onCheckUpdate handler never persisted the timestamp to localStorage or dispatched it to component state, so clicking "Last Check Update" would report the result but leave the displayed time stale.
This commit is contained in:
parent
d5ef7d77f5
commit
607ef5a8a9
@ -157,6 +157,12 @@ export const SystemInfoCard = () => {
|
||||
const onCheckUpdate = useLockFn(async () => {
|
||||
try {
|
||||
const info = await triggerCheckUpdate()
|
||||
const now = Date.now()
|
||||
localStorage.setItem('last_check_update', now.toString())
|
||||
dispatchSystemState({
|
||||
type: 'set-last-check-update',
|
||||
payload: new Date(now).toLocaleString(),
|
||||
})
|
||||
if (!info?.available) {
|
||||
showNotice.success(
|
||||
'settings.components.verge.advanced.notifications.latestVersion',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user