fix(client): 修正 ChangeNotifier 监听生命周期

This commit is contained in:
Zhou Weidong committed 2026-10-22 19:14:35 +08:00
1 parent 4291031ace
commit 8936c3d6eb
7 files changed
+286 -269

No files matched your search

+22 -19
View File
@@ -56,25 +56,28 @@ class _RecommendPageState extends State<RecommendPage> {
children: [
_header(l10n),
Expanded(
child: IndexedStack(
index: _tab.index,
children: [
ListenableBuilder(
listenable: widget.feedController,
builder: (context, _) => _recommendFeed(context),
),
RecommendSectionsView(
feedController: widget.feedController,
categories: categories,
onOpenDrama: _openDrama,
onMore: _handleMore,
),
AllDramasFilterGrid(
feedController: widget.feedController,
onOpenDrama: _openDrama,
onOpenFilter: widget.onOpenFilter,
),
],
child: ListenableBuilder(
listenable: Listenable.merge([
widget.feedController,
categories,
]),
builder: (context, _) => IndexedStack(
index: _tab.index,
children: [
_recommendFeed(context),
RecommendSectionsView(
feedController: widget.feedController,
categories: categories,
onOpenDrama: _openDrama,
onMore: _handleMore,
),
AllDramasFilterGrid(
feedController: widget.feedController,
onOpenDrama: _openDrama,
onOpenFilter: widget.onOpenFilter,
),
],
),
),
),
],