duxingchen
b731144a5a
fix: 移动端通知已读状态无法持久化
根因:
handleCardTap 中 try { await markNotificationRead(); item.is_read = true } catch {}
静默吞噬了 API 错误。PUT /notifications/{id}/read 调用失败时,本地 is_read
仍被设为 true,红点消失。下次进入页面重新拉取,服务端仍为未读状态。
修复:
- API 失败时保留 is_read = false,不更新本地状态
- 弹出Toast提示用户下拉刷新重试
- 失败时 return 阻止跳转,避免用户误以为已处理
2026-08-12 12:15:36 +08:00
..
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-12 12:15:36 +08:00
2026-08-07 11:53:40 +08:00
2026-08-07 11:44:20 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00
2026-08-05 15:01:46 +08:00