mirror of
https://github.com/immich-app/immich.git
synced 2026-03-22 09:00:58 +03:00
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.
This commit is contained in:
@@ -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());
|
ref.listen(provider.select((v) => v.status), (_, __) => hideTimer.reset());
|
||||||
|
|
||||||
final notifier = ref.read(provider.notifier);
|
final notifier = ref.read(provider.notifier);
|
||||||
|
|||||||
Reference in New Issue
Block a user