From 20e23f4b6b4f25f69dd30bcbd0527e713b44edd2 Mon Sep 17 00:00:00 2001 From: Thomas Way Date: Tue, 17 Mar 2026 16:48:54 +0000 Subject: [PATCH] fix(mobile): reset video controls hide timer when showing controls changes The hide timer currently only resets when the status of the video changes, but does not account for when the controls change. This means that two things happen: 1. The hide timer does not reset when the controls become visible again, the controls will stay visible forever or until the playback status changes. 2. The hide timer will fire too quickly, and will hide the controls much sooner than 5 seconds if the controls are hidden and then shown again before the hide timer fires. --- mobile/lib/widgets/asset_viewer/video_controls.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile/lib/widgets/asset_viewer/video_controls.dart b/mobile/lib/widgets/asset_viewer/video_controls.dart index 85707c82ea..a206aa9470 100644 --- a/mobile/lib/widgets/asset_viewer/video_controls.dart +++ b/mobile/lib/widgets/asset_viewer/video_controls.dart @@ -60,6 +60,9 @@ class VideoControls extends HookConsumerWidget { } }); + ref.listen(assetViewerProvider.select((v) => v.showingControls), (prev, showing) { + if (showing && prev != showing) hideTimer.reset(); + }); ref.listen(provider.select((v) => v.status), (_, __) => hideTimer.reset()); final notifier = ref.read(provider.notifier);