mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(mobile): not being able to zoom into live photos (#14608)
fix live photo zoom
This commit is contained in:
parent
e40c7c51ee
commit
3053d84e49
3 changed files with 10 additions and 33 deletions
|
|
@ -61,6 +61,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
final localPosition = useRef<Offset?>(null);
|
||||
final currentIndex = useValueNotifier(initialIndex);
|
||||
final loadAsset = renderList.loadAsset;
|
||||
final isPlayingMotionVideo = ref.watch(isPlayingMotionVideoProvider);
|
||||
|
||||
Future<void> precacheNextImage(int index) async {
|
||||
if (!context.mounted) {
|
||||
|
|
@ -249,7 +250,6 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
}
|
||||
|
||||
PhotoViewGalleryPageOptions buildAsset(BuildContext context, int index) {
|
||||
ref.read(isPlayingMotionVideoProvider.notifier).playing = false;
|
||||
var newAsset = loadAsset(index);
|
||||
final stackId = newAsset.stackId;
|
||||
if (stackId != null && currentIndex.value == index) {
|
||||
|
|
@ -260,7 +260,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
}
|
||||
}
|
||||
|
||||
if (newAsset.isImage && !newAsset.isMotionPhoto) {
|
||||
if (newAsset.isImage && !isPlayingMotionVideo) {
|
||||
return buildImage(context, newAsset);
|
||||
}
|
||||
return buildVideo(context, newAsset);
|
||||
|
|
@ -275,7 +275,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||
body: Stack(
|
||||
children: [
|
||||
PhotoViewGallery.builder(
|
||||
key: const ValueKey('gallery'),
|
||||
key: ValueKey(isPlayingMotionVideo),
|
||||
scaleStateChangedCallback: (state) {
|
||||
final asset = ref.read(currentAssetProvider);
|
||||
if (asset == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue