diff --git a/lib/pages/player/player_view.dart b/lib/pages/player/player_view.dart index 186c370..9991f03 100644 --- a/lib/pages/player/player_view.dart +++ b/lib/pages/player/player_view.dart @@ -537,7 +537,7 @@ class _PlayerPageState extends State with WidgetsBindingObserver { ? null : () => _openUnlockSheet(context, index, episode), ), - if (widget.homeMode && !_chromeVisible) + if (widget.homeMode && !_chromeVisible && !_boosting) Positioned( right: 12, bottom: 56, diff --git a/test/home/k28_a_navigation_test.dart b/test/home/k28_a_navigation_test.dart index 31a6fe0..880bbeb 100644 --- a/test/home/k28_a_navigation_test.dart +++ b/test/home/k28_a_navigation_test.dart @@ -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 {