fix(flutter): 隐藏首页加速态恢复清屏按钮

This commit is contained in:
Zhou Weidong committed 2026-10-20 17:12:28 +08:00
1 parent 030a0e7986
commit 5034ac7670
2 files changed
+36 -1

No files matched your search

+1 -1
View File
@@ -537,7 +537,7 @@ class _PlayerPageState extends State<PlayerPage> with WidgetsBindingObserver {
? null
: () => _openUnlockSheet(context, index, episode),
),
if (widget.homeMode && !_chromeVisible)
if (widget.homeMode && !_chromeVisible && !_boosting)
Positioned(
right: 12,
bottom: 56,
+35
View File
@@ -188,6 +188,41 @@ void main() {
expect(find.byKey(const Key('home-feed-search')), findsOneWidget);
});
testWidgets('should_hide_exit_clear_button_while_boosting', (tester) async {
await _pumpApp(tester);
final moreGesture = await tester.startGesture(const Offset(195, 300));
await tester.pump(const Duration(milliseconds: 700));
await tester.pump();
await moreGesture.up();
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('player-more-clear')));
await tester.pumpAndSettle();
expect(
find.byKey(const Key('home-feed-exit-clear-screen')),
findsOneWidget,
);
final boostGesture = await tester.startGesture(const Offset(60, 300));
await tester.pump(const Duration(milliseconds: 700));
await tester.pump();
expect(find.byKey(const Key('home-feed-speed-boost-hint')), findsOneWidget);
expect(find.byKey(const Key('home-feed-full-series')), findsOneWidget);
expect(find.byKey(const Key('home-feed-progress')), findsOneWidget);
expect(find.byKey(const Key('home-feed-exit-clear-screen')), findsNothing);
expect(find.byKey(const Key('home-feed-search')), findsNothing);
await boostGesture.up();
await tester.pumpAndSettle();
expect(find.byKey(const Key('home-feed-speed-boost-hint')), findsNothing);
expect(
find.byKey(const Key('home-feed-exit-clear-screen')),
findsOneWidget,
);
expect(find.byKey(const Key('home-feed-search')), findsOneWidget);
});
testWidgets('should_resume_playback_when_boosting_while_paused', (
tester,
) async {