From 8bca1b1d3ceadba7fa46958216b72eeb3dbe58da Mon Sep 17 00:00:00 2001 From: NekoInverter <42698724+nekoinverter@users.noreply.github.com> Date: Fri, 2 Oct 2020 10:27:52 +0000 Subject: [PATCH] Fix repeating albums (cherry picked from commit 6eba8d1e7d8e21c172c6c76b9d3cd066963b892a) --- .../src/main/java/org/telegram/ui/ChatActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 33b3cba00..2b8e1be12 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -16450,7 +16450,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } if (NekoConfig.showTranslate) { MessageObject messageObject = null; - if (selectedObjectGroup != null && selectedObjectGroup.messages.size() != 0) { + if (selectedObjectGroup != null) { if (!TextUtils.isEmpty(selectedObjectGroup.messages.get(0).messageOwner.message)) { messageObject = selectedObjectGroup.messages.get(0); } @@ -17563,7 +17563,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not case 88: { MessageObject messageObject = null; - if (selectedObjectGroup != null && selectedObjectGroup.messages.size() != 0) { + if (selectedObjectGroup != null) { if (!TextUtils.isEmpty(selectedObjectGroup.messages.get(0).messageOwner.message)) { messageObject = selectedObjectGroup.messages.get(0); } @@ -17643,7 +17643,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not return; } ArrayList messages = new ArrayList<>(); - messages.add(selectedObject); + if (selectedObjectGroup != null) { + messages.addAll(selectedObjectGroup.messages); + } else { + messages.add(selectedObject); + } forwardMessages(messages, false, true, 0); break; }