fix(achievement): 弹窗队列区分成就与题单奖章的 id 空间
两者的 id 来自不同的表、数值会重叠,却共用同一个队列: - 去重只按 id,队列里有奖章 5 时成就 5 会被当成重复项丢掉 - 弹完奖章后调 markAchievementsRead(奖章id),后端按成就 id 解释, 把同号且未弹过的成就静默标记为已弹,那个奖杯再也不会出现 载荷里本来就有 kind 字段,前端此前完全忽略。现在去重按 kind:id, 标记已读跳过奖章,弹窗标题也按类型区分。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -759,6 +759,10 @@ export interface PendingAchievement {
|
||||
description: string
|
||||
icon: string
|
||||
rarity: AchievementRarity
|
||||
// 弹窗队列里混着两种东西:全站成就和题单奖章。它们的 id 来自两张不同的表,
|
||||
// 数值会重叠,所以去重和标记已读都必须带上 kind 一起判断。
|
||||
// pending 接口只返回成就,不带这个字段,缺省按 achievement 处理。
|
||||
kind?: "achievement" | "badge"
|
||||
}
|
||||
|
||||
export interface AchievementSummary {
|
||||
|
||||
Reference in New Issue
Block a user