feat(category): 分类频道接入榜单快照

This commit is contained in:
Zhou Weidong committed 2026-11-02 14:44:38 +08:00
1 parent 8c1662475a
commit 59fbd33059
8 files changed
+234 -11

No files matched your search

@@ -22,6 +22,7 @@ import '../../../l10n/app_localizations.dart';
import 'home_category_dramas.dart';
import 'home_feed_card.dart';
import 'home_grid_header.dart';
import 'home_ranking_dramas.dart';
const double _loadMoreThreshold = 240;
@@ -175,6 +176,12 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
required CatalogController catalog,
}) {
final controller = context.read<CategoryController>();
if (category.isRanking) {
return HomeRankingDramas(
categoryId: category.categoryId,
onOpenDrama: widget.onOpenDrama,
);
}
if (controller.dramaPageLoader != null && category.categoryId.isNotEmpty) {
return HomeCategoryDramas(
lockedCategoryId: category.categoryId,
@@ -320,6 +327,7 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
categoryName: category.name,
categoryId: category.id,
tab: HomePrimaryTab.categories,
layoutType: category.layoutType,
),
];
}
@@ -23,12 +23,16 @@ class HomeGridCategoryShortcut {
required this.categoryName,
required this.categoryId,
required this.tab,
this.layoutType = 'GRID',
});
final String label;
final String categoryName;
final String categoryId;
final HomePrimaryTab tab;
final String layoutType;
bool get isRanking => layoutType == 'RANKING';
}
class HomeGridCallbacks {