1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

ensure dimensions for memory cards

This commit is contained in:
mertalev 2024-11-17 00:02:22 -05:00
parent aa890c0858
commit 60715059f7
No known key found for this signature in database
GPG key ID: CA85EF6600C9E8AD
2 changed files with 12 additions and 6 deletions

View file

@ -61,6 +61,8 @@ class NativeVideoViewerPage extends HookConsumerWidget {
// If the swipe is canceled, `currentAsset` will not have changed and video A will continue to play.
final currentAsset = useState(ref.read(currentAssetProvider));
final isCurrent = currentAsset.value == asset;
// used to show the placeholder during hero animations for remote videos to avoid a stutter
final isVisible = useState(asset.isLocal || asset.isMotionPhoto);
final log = Logger('NativeVideoViewerPage');

View file

@ -68,13 +68,17 @@ class MemoryCard extends StatelessWidget {
} else {
return Hero(
tag: 'memory-${asset.id}',
child: NativeVideoViewerPage(
key: ValueKey(asset.id),
asset: asset,
showControls: false,
image: SizedBox.expand(
child: ImmichImage(
child: SizedBox(
width: context.width,
height: context.height,
child: NativeVideoViewerPage(
key: ValueKey(asset.id),
asset: asset,
showControls: false,
image: ImmichImage(
asset,
width: context.width,
height: context.height,
fit: fit,
),
),