1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-04 17:10:12 +01:00

fix forward preview text

This commit is contained in:
luvletter2333 2022-06-25 20:47:02 +08:00
parent 1c3495c92e
commit 018c93db24
No known key found for this signature in database
GPG Key ID: A26A8880836E1978

View File

@ -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);
}