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:
Tunglies 2026-03-27 21:58:13 +08:00
parent d5ef7d77f5
commit 607ef5a8a9
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8

View File

@ -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',