Files
FruitServer/docs/plans/INBOX.md
T

24 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## [已处理] 2026-10-20 | K43-A 修复首页冷启动灰屏闪一下(封面占位改深色)(仅 App 端)
**用户指令(2026-10-20,原文)**:
> 「现在优化下首页的播放 每次启动安装 首页会灰屏一下 查下是什么原因」
**已定位原因**
1. 冷启动链路:原生开屏(深色)→ `SplashPage`(ink)→ `catalog.settled` 后进入 feed;此时视频未就绪,走 K40-A 的封面占位。
2. `RemoteImage` 的加载中/失败占位底色是 `AppColors.bar`(#FFFDFB 近白),上面又叠了 `0x66000000` 黑遮罩(40% 黑),两者混合后呈**中灰**,在深色开屏与视频之间就出现「灰屏一下」。
3. 视频 Texture 首帧前本身是黑,不构成灰屏。
**口径(只改 Flutter,不动后端、不改接口)**
1. `RemoteImage` 增加可选 `fallbackColor`(默认仍为 `AppColors.bar`,其它页面行为不变)。
2. 播放页未就绪占位:`RemoteImage(..., fallbackColor: Colors.black)`;遮罩从 `0x66000000` 降为 `0x4D000000`(30%),保证「黑底 → 封面 → 视频」全程无浅色/灰色闪屏。
3. feed 首帧前最底层始终为纯黑:保留 `player-fallback-background` 并在其下垫 `ColoredBox(Colors.black)`,确保任何加载阶段都不会露出页面底色。
4. 顺带确认:`_HomeTabs` 的 `ValueKey(catalog.dramas.first.id)` 会在目录首项变化时重建整棵 Tab 树;仅当首项 id 变化才重建,冷启动只发生一次,保持现状,不加额外动画。
5. 其它页面(列表、详情、收藏等)的 `RemoteImage` 占位保持原样。
**测试/门禁**
- 新增:播放页未就绪时 `player-fallback-background` 的 `RemoteImage.fallbackColor == Colors.black`;遮罩透明度为 0x4D;
- 现有播放/首页用例保持通过;
- `dart analyze lib test` 零告警 + `flutter test` 全过 + `flutter build apk --debug`。
**流程**:从 `develop` 拉 `fix/flutter-k43-cold-start-flash`;作者 `Zhou Weidong <502333560@qq.com>`;`--no-ff` 合回 develop 并 push;PROGRESS 留痕;真机验收由用户执行(冷启动观察是否还有灰屏)。