fix(theater): 修复新剧卡片与榜单溢出

This commit is contained in:
Zhou Weidong committed 2026-10-26 22:49:13 +08:00
1 parent d4ce3a5d8b
commit 391b01e9d0
3 files changed
+15 -9

No files matched your search

@@ -432,7 +432,7 @@ class _NewReleasesPageState extends State<NewReleasesPage> {
),
),
),
const SizedBox(height: 6),
const SizedBox(height: 4),
Text(
drama.title,
maxLines: 1,
+7 -5
View File
@@ -509,11 +509,13 @@ Widget _heat(int count, AppLocalizations l10n) {
size: 11,
),
const SizedBox(width: 4),
Text(
l10n.heatLabel(formatPlayCount(count)),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: AppColors.textTertiary, fontSize: 11),
Flexible(
child: Text(
l10n.heatLabel(formatPlayCount(count)),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(color: AppColors.textTertiary, fontSize: 11),
),
),
],
);
+7 -3
View File
@@ -7,6 +7,7 @@ import 'package:fruitshorts/core/data/models/drama.dart';
import 'package:fruitshorts/core/data/models/home_feed.dart';
import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/core/widgets/app_pull_to_refresh.dart';
import 'package:fruitshorts/pages/discover/discover_view.dart';
import 'package:fruitshorts/core/data/repositories/favorite_repository.dart';
import 'package:fruitshorts/core/data/repositories/playback_repository.dart';
import 'package:fruitshorts/core/data/repositories/watch_history_repository.dart';
@@ -119,7 +120,7 @@ void main() {
expect(top2.width, greaterThan(100));
expect(top2.left, lessThan(top1.left));
expect(top3.left, greaterThan(top1.right));
expect(top1.bottom, closeTo(top2.bottom - 12, 0.5));
expect(top1.bottom, closeTo(top2.bottom - 30, 0.5));
expect(top2.bottom, closeTo(top3.bottom, 0.5));
expect(find.byKey(const Key('ranking-row-3')), findsNothing);
});
@@ -219,7 +220,7 @@ void main() {
expect(position.pixels, 0);
position.jumpTo(position.maxScrollExtent);
await tester.pump();
expect(find.byKey(const Key('ranking-load-more')), findsNothing);
expect(find.byKey(const Key('ranking-load-more')), findsOneWidget);
expect(find.byKey(const Key('ranking-no-more')), findsNothing);
await tester.pumpAndSettle();
});
@@ -311,7 +312,10 @@ Future<void> _pumpTheater(
),
);
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('home-search-entry')));
Navigator.of(tester.element(find.byKey(const Key('home-search-entry'))))
.push<void>(
MaterialPageRoute(builder: (_) => const DiscoverPage()),
);
await tester.pumpAndSettle();
}