mirror of
https://github.com/immich-app/immich
synced 2026-08-15 13:03:57 +00:00
fix(mobile): use key on video controls (#27512)
The widget is not recreated correctly when videoPlayName changes, which can cause weird behaviour with hooks and timers (like timers not firing when they should do). Using a key forces flutter to recreate the widget properly and allow the assumptions in build to work correctly.
This commit is contained in:
parent
960be0c27a
commit
776b9cbad5
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ class ViewerBottomBar extends ConsumerWidget {
|
|||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (asset.isVideo) VideoControls(videoPlayerName: asset.heroTag),
|
||||
if (asset.isVideo) VideoControls(key: ValueKey(asset.heroTag), videoPlayerName: asset.heroTag),
|
||||
if (!isReadonlyModeEnabled)
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: actions),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue