fix(i18n): 去掉印尼语内容完整性过滤,缺失时回退中文
This commit is contained in:
1 parent
c307903c42
commit
3bc79ad8e2
12 files changed
+17
-123
No files matched your search
@@ -7,7 +7,6 @@ import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../core/data/models/drama.dart';
|
||||
import '../../../core/data/services/category_controller.dart';
|
||||
import '../../../core/formatting/content_locale_guard.dart';
|
||||
import '../../../core/theme/app_dimens.dart';
|
||||
import '../../../core/widgets/app_pull_to_refresh.dart';
|
||||
import '../../../core/widgets/drama_grid_skeleton.dart';
|
||||
@@ -78,10 +77,7 @@ class _HomeCategoryDramasState extends State<HomeCategoryDramas> {
|
||||
final controller = context.watch<CategoryController>();
|
||||
final categoryId = widget.lockedCategoryId ?? '';
|
||||
final slot = categoryId.isEmpty ? null : controller.slotOf(categoryId);
|
||||
final dramas = visibleDramasForLocale(
|
||||
slot?.dramas ?? const <Drama>[],
|
||||
Localizations.localeOf(context).languageCode,
|
||||
);
|
||||
final dramas = slot?.dramas ?? const <Drama>[];
|
||||
return Column(
|
||||
children: [
|
||||
Expanded(
|
||||
|
||||
@@ -12,7 +12,6 @@ import '../../../core/data/services/catalog_controller.dart';
|
||||
import '../../../core/data/services/category_controller.dart';
|
||||
import '../../../core/data/services/home_feed_controller.dart';
|
||||
import '../../../core/data/services/wallet_controller.dart';
|
||||
import '../../../core/formatting/content_locale_guard.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_dimens.dart';
|
||||
import '../../../core/widgets/app_pull_to_refresh.dart';
|
||||
@@ -195,10 +194,7 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
|
||||
mainAxisSpacing: AppDimens.homeGridRowGap,
|
||||
);
|
||||
}
|
||||
final dramas = _dramasFor(
|
||||
category,
|
||||
Localizations.localeOf(context).languageCode,
|
||||
);
|
||||
final dramas = _dramasFor(category);
|
||||
if (widget.feedController.loadingFirstPage && dramas.isEmpty) {
|
||||
return const DramaGridSkeleton(
|
||||
key: Key('home-grid-skeleton'),
|
||||
@@ -328,14 +324,8 @@ class _HomeFeedGridState extends State<HomeFeedGrid> {
|
||||
];
|
||||
}
|
||||
|
||||
List<Drama> _dramasFor(
|
||||
HomeGridCategoryShortcut category,
|
||||
String languageCode,
|
||||
) {
|
||||
final dramas = visibleDramasForLocale(
|
||||
widget.feedController.dramas,
|
||||
languageCode,
|
||||
);
|
||||
List<Drama> _dramasFor(HomeGridCategoryShortcut category) {
|
||||
final dramas = widget.feedController.dramas;
|
||||
final categoryName = category.categoryName.toLowerCase();
|
||||
if (categoryName.isEmpty) return dramas;
|
||||
final matched = dramas
|
||||
|
||||
Reference in new issue
Block a user