From 1772f720bfd55df69ebed153ed7011109c1f79f7 Mon Sep 17 00:00:00 2001 From: Thomas <9749173+uhthomas@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:12:56 +0100 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20reset=20video=20controls=20hide?= =?UTF-8?q?=20timer=20when=20showing=20controls=20ch=E2=80=A6=20(#26985)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ff782113c7..946e64fcbb 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);