From c5cb691f2bf81b81f5e61465846fe85ab71c023f Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 11 Jul 2019 02:41:06 +0200 Subject: [PATCH] Fixed GIFs not respecting autoplay preference --- .../TelegramUI/ChatMessageMediaBubbleContentNode.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageMediaBubbleContentNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageMediaBubbleContentNode.swift index 83d69b04df..9f0b6b80f2 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageMediaBubbleContentNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageMediaBubbleContentNode.swift @@ -81,13 +81,13 @@ class ChatMessageMediaBubbleContentNode: ChatMessageBubbleContentNode { } if !item.message.containsSecretMedia { - if telegramFile.isAnimated { + if telegramFile.isAnimated && item.controllerInteraction.automaticMediaDownloadSettings.autoplayGifs { if case .full = automaticDownload { - automaticPlayback = item.controllerInteraction.automaticMediaDownloadSettings.autoplayGifs + automaticPlayback = true //item.controllerInteraction.automaticMediaDownloadSettings.autoplayGifs } else { automaticPlayback = item.context.account.postbox.mediaBox.completedResourcePath(telegramFile.resource) != nil } - } else if telegramFile.isVideo && item.controllerInteraction.automaticMediaDownloadSettings.autoplayVideos { + } else if (telegramFile.isVideo && !telegramFile.isAnimated) && item.controllerInteraction.automaticMediaDownloadSettings.autoplayVideos { if case .full = automaticDownload { automaticPlayback = true } else {