fix(i18n): 印尼语内容缺失时不再回退中文

This commit is contained in:
Vicky authored and trae-solo-agent committed 2026-10-30 17:14:37 +08:00
1 parent 9ef8eb15b0
commit 19196ceb8e
13 files changed
+261 -95

No files matched your search

+13 -1
View File
@@ -13,6 +13,7 @@ import '../../core/data/services/download_controller.dart';
import '../../core/data/services/home_feed_controller.dart';
import '../../core/data/services/playlist_controller.dart';
import '../../core/data/services/wallet_controller.dart';
import '../../core/formatting/content_locale_guard.dart';
import '../../core/theme/app_colors.dart';
import '../../core/widgets/empty_state.dart';
import '../../l10n/app_localizations.dart';
@@ -289,7 +290,10 @@ class _RecommendPageState extends State<RecommendPage>
Widget _recommendFeed(BuildContext context) {
final feed = widget.feedController;
final dramas = widget.feedController.dramas;
final dramas = visibleDramasForLocale(
widget.feedController.dramas,
Localizations.localeOf(context).languageCode,
);
if (dramas.isNotEmpty) {
return PlayerPage(
key: const Key('recommend-feed-player'),
@@ -327,6 +331,9 @@ class _RecommendPageState extends State<RecommendPage>
key: const Key('recommend-feed-empty'),
icon: Icons.wifi_off_rounded,
title: l10n.networkError,
actionLabel: l10n.retry,
actionKey: const Key('recommend-feed-retry'),
onAction: _retryRecommendData,
),
);
}
@@ -340,6 +347,11 @@ class _RecommendPageState extends State<RecommendPage>
);
}
void _retryRecommendData() {
_cancelRecommendRetries();
unawaited(_refreshRecommendData());
}
PlaylistController? _watchPlaylists(BuildContext context) {
try {
return context.watch<PlaylistController>();