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.
This commit is contained in:
Tunglies 2026-03-28 02:30:43 +08:00
parent 857392de8a
commit c3aba3fc79
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@
- 修复系统代理关闭后在 PAC 模式下未完全关闭
- 修复 macOS 开关代理时可能的卡死
- 修复修改定时自动更新后记时未及时刷新
### ✨ 新增功能

View File

@ -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()