From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Wed, 22 Apr 2026 08:10:29 +0300
Subject: disable "motion photos" throughout the app, both sending and rendering

---
 .../main/java/org/telegram/messenger/MediaController.java  | 1 +
 .../main/java/org/telegram/messenger/MessageObject.java    | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java
+++ b/TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java
@@ -616,6 +616,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
         @Override
         public boolean isLivePhoto() {
             if (isVideo || parsedXmp) return isLivePhoto;
+            if (desu.inugram.InuConfig.DISABLE_MOTION_PHOTOS.getValue()) return false;
             parsedXmp = true;
             final long start = System.currentTimeMillis();
             try {
diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java
+++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessageObject.java
@@ -10577,6 +10577,9 @@ public class MessageObject {
         if (getMedia(message) instanceof TLRPC.TL_messageMediaWebPage) {
             return isVideoDocument(getMedia(message).webpage.document);
         }
+        if (getMedia(message) instanceof TLRPC.TL_messageMediaPhoto && getMedia(message).live_photo && desu.inugram.InuConfig.DISABLE_MOTION_PHOTOS.getValue()) {
+            return false;
+        }
         return getMedia(message) != null && isVideoDocument(getMedia(message).document);
     }
 
@@ -11101,7 +11104,8 @@ public class MessageObject {
     }
 
     public boolean isDocument() {
-        return getDocument() != null && !isVideo() && !isMusic() && !isVoice() && !isAnyKindOfSticker();
+        return getDocument() != null && !isVideo() && !isMusic() && !isVoice() && !isAnyKindOfSticker()
+            && !(desu.inugram.InuConfig.DISABLE_MOTION_PHOTOS.getValue() && getMedia(this) != null && getMedia(this).live_photo);
     }
 
     public boolean isVoice() {
@@ -11121,6 +11125,7 @@ public class MessageObject {
     }
 
     public boolean isLivePhoto() {
+        if (desu.inugram.InuConfig.DISABLE_MOTION_PHOTOS.getValue()) return false;
         final TLRPC.MessageMedia media = getMedia(this);
         return media != null && media.live_photo;
     }
