From 018c93db24a0549c440d1b66914d903d869bd999 Mon Sep 17 00:00:00 2001 From: luvletter2333 Date: Sat, 25 Jun 2022 20:47:02 +0800 Subject: [PATCH] fix forward preview text --- .../java/org/telegram/ui/ChatActivity.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index a104b3a56..dcad9e82e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -12187,23 +12187,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not } formwardingNameText = userNames; if (type == -1 || type == 0 || type == 10 || type == 11) { - if (messageObjectsToForward.size() == 1 && messageObjectsToForward.get(0).messageText != null) { - MessageObject messageObject = messageObjectsToForward.get(0); - if (messageObject.messageOwner.media instanceof TLRPC.TL_messageMediaGame) { - replyNameTextView.setText(messageObject.messageOwner.media.game.title); - } else { - String mess = messageObject.messageText.toString(); - if (mess.length() > 150) { - mess = mess.substring(0, 150); - } - mess = mess.replace('\n', ' '); - replyNameTextView.setText(mess); - } - } else { - replyNameTextView.setText(LocaleController.formatPluralString("PreviewForwardMessagesCount", messageObjectsToForward.size())); - } + replyNameTextView.setText(LocaleController.formatPluralString("PreviewForwardMessagesCount", messageObjectsToForward.size())); } else if (type == 1) { - replyNameTextView.setText(LocaleController.formatPluralString("ForwardedPhoto", messageObjectsToForward.size())); + replyNameTextView.setText(LocaleController.formatPluralString("PreviewForwardPhoto", messageObjectsToForward.size())); if (messageObjectsToForward.size() == 1) { messageObjectToReply = messageObjectsToForward.get(0); }