From c3aba3fc79564dd57b95d03e7cd1017e8b14f7b0 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Sat, 28 Mar 2026 02:30:43 +0800 Subject: [PATCH] fix(profile): refresh profile data after timer auto-update completes The profile-update-completed event handler was missing a mutate('getProfiles') call, causing the "X time ago" display to show stale timestamps after backend timer auto-updates. --- Changelog.md | 1 + src/components/profile/profile-item.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Changelog.md b/Changelog.md index fe968b2aa..5910f457f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ - 修复系统代理关闭后在 PAC 模式下未完全关闭 - 修复 macOS 开关代理时可能的卡死 +- 修复修改定时自动更新后记时未及时刷新 ### ✨ 新增功能 diff --git a/src/components/profile/profile-item.tsx b/src/components/profile/profile-item.tsx index b8a8faab4..ea7abad72 100644 --- a/src/components/profile/profile-item.tsx +++ b/src/components/profile/profile-item.tsx @@ -578,6 +578,8 @@ export const ProfileItem = (props: Props) => { const customEvent = event as CustomEvent<{ uid?: string }> if (customEvent.detail?.uid === itemData.uid) { setLoadingCache((cache) => ({ ...cache, [itemData.uid]: false })) + // 刷新 profile 数据以获取最新的 updated 时间戳 + mutate('getProfiles') // 更新完成后刷新显示 if (showNextUpdate) { fetchNextUpdateTime()