feat(app): 客户端展示多语言并支持筛选分页
This commit is contained in:
1 parent
8481611372
commit
8b50b5bd06
68 files changed
+2742
-1120
No files matched your search
@@ -97,7 +97,7 @@ class FollowingFavoritesGrid extends StatelessWidget {
|
||||
final episode = drama.episodes.isEmpty ? 1 : drama.episodes.first.number;
|
||||
return FollowingGridCard(
|
||||
dramaId: drama.id,
|
||||
title: drama.title,
|
||||
title: drama.localizedTitle(Localizations.localeOf(context).languageCode),
|
||||
posterUrl: drama.posterUrl,
|
||||
viewCount: drama.viewCount,
|
||||
editing: isEditing,
|
||||
|
||||
@@ -402,7 +402,11 @@ class _HistoryList extends StatelessWidget {
|
||||
|
||||
return FollowingHistoryCard(
|
||||
dramaId: record.dramaId,
|
||||
title: _historyTitle(l10n, record),
|
||||
title: _historyTitle(
|
||||
l10n,
|
||||
record,
|
||||
Localizations.localeOf(context).languageCode,
|
||||
),
|
||||
posterUrl: record.displayCover,
|
||||
viewCount:
|
||||
record.progress.viewCount ??
|
||||
@@ -433,10 +437,13 @@ class _HistoryList extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
String _historyTitle(AppLocalizations l10n, WatchRecord record) {
|
||||
return record.displayTitle.isEmpty
|
||||
? l10n.episodeLabel(record.episodeNumber)
|
||||
: record.displayTitle;
|
||||
String _historyTitle(
|
||||
AppLocalizations l10n,
|
||||
WatchRecord record,
|
||||
String languageCode,
|
||||
) {
|
||||
final title = record.localizedDisplayTitle(languageCode);
|
||||
return title.isEmpty ? l10n.episodeLabel(record.episodeNumber) : title;
|
||||
}
|
||||
|
||||
String _historySubtitle(AppLocalizations l10n, WatchRecord record) {
|
||||
|
||||
@@ -130,6 +130,8 @@ class FollowingPagedGrid extends StatelessWidget {
|
||||
SliverToBoxAdapter(
|
||||
child: PagedListFooter(
|
||||
loading: loadingMore,
|
||||
hasMore: hasMore,
|
||||
hasItems: hasItems,
|
||||
errorMessage: loadMoreError,
|
||||
onRetry: onLoadMore,
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user