fix(home): 首切频道预取并保留播放画面

This commit is contained in:
Zhou Weidong committed 2026-10-21 17:53:58 +08:00
1 parent dfa79bed88
commit 677e49fa6e
5 files changed
+242 -27

No files matched your search

+6 -1
View File
@@ -59,6 +59,7 @@ class PlayerPage extends StatefulWidget {
this.onMenu,
this.feedDramas,
this.feedChannel,
this.headerChannel,
this.onDramaChanged,
this.onImmersiveChanged,
this.onOpenFullPlayer,
@@ -82,6 +83,7 @@ class PlayerPage extends StatefulWidget {
final VoidCallback? onMenu;
final List<Drama>? feedDramas;
final HomeFeedChannel? feedChannel;
final HomeFeedChannel? headerChannel;
final ValueChanged<Drama>? onDramaChanged;
final ValueChanged<bool>? onImmersiveChanged;
final Future<void> Function(Drama drama, Episode episode)? onOpenFullPlayer;
@@ -295,7 +297,10 @@ class _PlayerPageState extends State<PlayerPage>
bottom: false,
child: HomeFeedHeader(
l10n: l10n,
channel: widget.feedChannel ?? HomeFeedChannel.recommend,
channel:
widget.headerChannel ??
widget.feedChannel ??
HomeFeedChannel.recommend,
onChannelSelected: widget.onChannelSelected ?? (_) {},
onRefresh: () async {
final ok = await widget.onRefreshFeed?.call() ?? true;