mirror of
https://github.com/immich-app/immich.git
synced 2025-02-11 01:18:24 -05:00
ensure dimensions for memory cards
This commit is contained in:
parent
aa890c0858
commit
60715059f7
2 changed files with 12 additions and 6 deletions
|
@ -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.
|
// If the swipe is canceled, `currentAsset` will not have changed and video A will continue to play.
|
||||||
final currentAsset = useState(ref.read(currentAssetProvider));
|
final currentAsset = useState(ref.read(currentAssetProvider));
|
||||||
final isCurrent = currentAsset.value == asset;
|
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 isVisible = useState(asset.isLocal || asset.isMotionPhoto);
|
||||||
|
|
||||||
final log = Logger('NativeVideoViewerPage');
|
final log = Logger('NativeVideoViewerPage');
|
||||||
|
|
|
@ -68,13 +68,17 @@ class MemoryCard extends StatelessWidget {
|
||||||
} else {
|
} else {
|
||||||
return Hero(
|
return Hero(
|
||||||
tag: 'memory-${asset.id}',
|
tag: 'memory-${asset.id}',
|
||||||
child: NativeVideoViewerPage(
|
child: SizedBox(
|
||||||
key: ValueKey(asset.id),
|
width: context.width,
|
||||||
asset: asset,
|
height: context.height,
|
||||||
showControls: false,
|
child: NativeVideoViewerPage(
|
||||||
image: SizedBox.expand(
|
key: ValueKey(asset.id),
|
||||||
child: ImmichImage(
|
asset: asset,
|
||||||
|
showControls: false,
|
||||||
|
image: ImmichImage(
|
||||||
asset,
|
asset,
|
||||||
|
width: context.width,
|
||||||
|
height: context.height,
|
||||||
fit: fit,
|
fit: fit,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue