From 679d83863e77f25226a1006f6464180e8678628b Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 9 Mar 2023 17:00:30 -0800 Subject: [PATCH] viewer: allow metadata edits to live photos --- src/components/viewer/Viewer.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/viewer/Viewer.vue b/src/components/viewer/Viewer.vue index 3c665258..940f1c1d 100644 --- a/src/components/viewer/Viewer.vue +++ b/src/components/viewer/Viewer.vue @@ -338,7 +338,6 @@ export default defineComponent({ canEdit(): boolean { return ( this.currentPhoto?.mimetype?.startsWith("image/") && - !this.currentPhoto.liveid && this.currentPhoto.imageInfo?.permissions?.includes("U") ); }, @@ -861,6 +860,15 @@ export default defineComponent({ openEditor() { // Only for JPEG for now if (!this.canEdit) return; + + // Prevent editing live photos + if (this.currentPhoto.liveid) { + alert( + this.t("memories", "Editing is currently disabled for live photos") + ); + return; + } + this.editorOpen = true; },