fix(recommend): 修正热播信息行与操作栏位置
This commit is contained in:
1 parent
8737937875
commit
0c06a6dccd
11 files changed
+78
-5
No files matched your search
@@ -30,12 +30,14 @@ class HomeFeedInfoPanel extends StatefulWidget {
|
||||
required this.episode,
|
||||
required this.onDetail,
|
||||
required this.onOpenFullPlayer,
|
||||
this.rankingRank,
|
||||
});
|
||||
|
||||
final Drama drama;
|
||||
final Episode episode;
|
||||
final VoidCallback onDetail;
|
||||
final VoidCallback onOpenFullPlayer;
|
||||
final int? rankingRank;
|
||||
|
||||
@override
|
||||
State<HomeFeedInfoPanel> createState() => _HomeFeedInfoPanelState();
|
||||
@@ -119,6 +121,7 @@ class _HomeFeedInfoPanelState extends State<HomeFeedInfoPanel> {
|
||||
Widget _metaPills(AppLocalizations l10n) {
|
||||
final hot = isHotDrama(widget.drama);
|
||||
final views = widget.drama.viewCount;
|
||||
final rank = widget.rankingRank;
|
||||
if (!hot && views <= 0) return const SizedBox.shrink();
|
||||
return Wrap(
|
||||
key: const Key('home-feed-meta-pills'),
|
||||
@@ -139,7 +142,9 @@ class _HomeFeedInfoPanelState extends State<HomeFeedInfoPanel> {
|
||||
),
|
||||
const SizedBox(width: 2),
|
||||
Text(
|
||||
l10n.rankingHot,
|
||||
rank != null && rank > 0
|
||||
? l10n.hotChartRanked(rank)
|
||||
: l10n.hotChartLabel,
|
||||
style: const TextStyle(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: _metaFont,
|
||||
@@ -154,7 +159,7 @@ class _HomeFeedInfoPanelState extends State<HomeFeedInfoPanel> {
|
||||
key: const Key('home-feed-view-pill'),
|
||||
background: AppColors.overlaySoft,
|
||||
child: Text(
|
||||
formatInteractionCount(views),
|
||||
formatPlayCount(views),
|
||||
style: const TextStyle(
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: _metaFont,
|
||||
@@ -209,7 +214,7 @@ class _HomeFeedInfoPanelState extends State<HomeFeedInfoPanel> {
|
||||
],
|
||||
Expanded(
|
||||
child: Text(
|
||||
genres.join(' | '),
|
||||
genres.join(' '),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
@@ -225,6 +230,8 @@ class _HomeFeedInfoPanelState extends State<HomeFeedInfoPanel> {
|
||||
widget.drama.episodeCount,
|
||||
),
|
||||
key: const Key('home-feed-episode-progress'),
|
||||
maxLines: 1,
|
||||
softWrap: false,
|
||||
style: const TextStyle(
|
||||
color: AppColors.overlaySecondary,
|
||||
fontSize: _metaFont,
|
||||
|
||||
Reference in new issue
Block a user