refactor: 红点统一管理(activeDotCards+renderDots)+ 去掉提示条

按矩阵验证的19个场景统一重写通知逻辑:

核心改动:
- activeDotCards 集合累积管理红点,只增不减(除显式操作)
- renderDots() 统一渲染,不在各处单独设 visibility
- 去掉提示条(用户反馈不好看)

场景覆盖:
- 场景1-2: 首页连续收到不同分类通知 → activeDotCards累积 
- 场景3: 点横幅 → consumeAll+activeDotCards清空 
- 场景4-5: 点红点 → activeDotCards移除对应+renderDots 
- 场景7: 所有红点点完 → 自动consumeAll清理 
- 场景11-16: 非首页 → preNotificationStats精确diffStats→补充activeDotCards 
- 场景18: 全部查看后新通知 → consumeAll已重置,新通知正常累积 
- 场景19: 列表中又来通知 → 返回后onResume补充新红点,不覆盖已ack的 

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dongliang
2026-04-29 17:47:52 +09:30
parent f785be91a6
commit e6c218d830
2 changed files with 71 additions and 115 deletions

View File

@@ -42,22 +42,6 @@
</LinearLayout>
<!-- 新任务提示条pendingCount>0 时显示,点击查看所有新任务) -->
<TextView
android:id="@+id/tvNewTaskHint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:background="@drawable/bg_new_task_hint"
android:gravity="center"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="有1条新任务 点击查看"
android:textColor="#FF3B9EFF"
android:textSize="18sp"
android:textStyle="bold"
android:visibility="gone" />
<!-- 快捷区 gap:6px→8dp -->
<LinearLayout
android:layout_width="match_parent"