feat(app): 完善播放协议搜索与空状态
This commit is contained in:
1 parent
671e0ce143
commit
ef29fc5f15
85 files changed
+2976
-768
No files matched your search
@@ -207,7 +207,7 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
|
||||
if (dramas.isEmpty)
|
||||
SliverFillRemaining(
|
||||
hasScrollBody: false,
|
||||
child: _emptyState(l10n, tab, tag),
|
||||
child: _emptyState(l10n),
|
||||
)
|
||||
else
|
||||
SliverPadding(
|
||||
@@ -360,7 +360,7 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
|
||||
}
|
||||
}
|
||||
|
||||
Widget _emptyState(AppLocalizations l10n, HomePrimaryTab tab, String? tag) {
|
||||
Widget _emptyState(AppLocalizations l10n) {
|
||||
if (widget.feedController.lastError != null) {
|
||||
return EmptyState(
|
||||
key: const Key('home-grid-error'),
|
||||
@@ -370,19 +370,10 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
|
||||
onAction: () => unawaited(widget.feedController.refreshCurrent()),
|
||||
);
|
||||
}
|
||||
final filtered =
|
||||
tab == HomePrimaryTab.costume ||
|
||||
tab == HomePrimaryTab.community ||
|
||||
tag != null;
|
||||
return EmptyState(
|
||||
key: const Key('home-grid-empty'),
|
||||
icon: Icons.movie_filter_outlined,
|
||||
title: filtered ? l10n.homeGridFilterEmpty : l10n.noStories,
|
||||
subtitle: filtered ? null : l10n.emptyHint,
|
||||
actionLabel: filtered ? l10n.homeGridClearFilter : null,
|
||||
onAction: filtered
|
||||
? () => setState(() => _selectedTags[tab] = null)
|
||||
: null,
|
||||
title: l10n.emptyContent,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user