fix(recommend): 修正进度取消状态更新编译错误

This commit is contained in:
Zhou Weidong committed 2026-10-22 20:04:43 +08:00
1 parent ac4a800b78
commit d731b36c1f
3 files changed
+4 -4

No files matched your search

+1
View File
@@ -1185,3 +1185,4 @@ $ flutter test
- 简介「展开/收起」沿用现有三语文案;进度条热区恢复 24 并接入拖动自动清屏与预览卡片。
- 拖动期间隐藏操作栏、文字及根底栏,顶部导航常驻;松手后持续清屏直到点击画面。
- 进度条固定中心并动画到 6 高,时间气泡限制在左右 12;按当前流程未执行 analyze/test。
- 修复 `scrubCancelRequest` 误置于 `initState` 的编译错误,并清理推荐页未使用变量;`flutter analyze` 无问题。
+3 -3
View File
@@ -138,9 +138,6 @@ class _PlayerPageState extends State<PlayerPage>
downloads: widget.downloads,
);
logic.attach(widget, isMounted: () => mounted);
if (oldWidget.scrubCancelRequest != widget.scrubCancelRequest) {
_cancelFeedScrub();
}
_thumbnailService = PlaybackThumbnailService(
sourceResolver: _resolveThumbnailSource,
);
@@ -156,6 +153,9 @@ class _PlayerPageState extends State<PlayerPage>
void didUpdateWidget(covariant PlayerPage oldWidget) {
super.didUpdateWidget(oldWidget);
logic.attach(widget, isMounted: () => mounted);
if (oldWidget.scrubCancelRequest != widget.scrubCancelRequest) {
_cancelFeedScrub();
}
final channelChanged = oldWidget.feedChannel != widget.feedChannel;
final feedChanged =
_feedSignature(oldWidget.feedDramas) !=
-1
View File
@@ -48,7 +48,6 @@ class _RecommendPageState extends State<RecommendPage> {
@override
Widget build(BuildContext context) {
final l10n = AppLocalizations.of(context)!;
final categories = context.read<CategoryController>();
return ColoredBox(
key: const Key('recommend-page'),