diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 4c48e4666..acdcfde0e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -2362,6 +2362,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not StringBuilder str = new StringBuilder(); ArrayList toDeleteMessagesIds = new ArrayList<>(); MessageObject replyTo = getThreadMessage(); + ArrayList suffice_en = new ArrayList(Arrays.asList(',', '.', '!', '?', ':', ';', '(', ')')); + ArrayList suffice_zh = new ArrayList(Arrays.asList(',', '。', '!', '?', ':', ';', '(', ')')); for (int a = 1; a >= 0; a--) { ArrayList ids = new ArrayList<>(); for (int b = 0; b < selectedMessagesCanCopyIds[a].size(); b++) { @@ -2379,7 +2381,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not replyTo = messageObject.replyMessageObject; } if (str.length() != 0) { - str.append(" "); + if (!suffice_en.contains(str.charAt(str.length() - 1)) && !suffice_zh.contains(str.charAt(str.length() - 1))) { + // add comma refer to language + if (LocaleController.getInstance().getCurrentLocale().getLanguage().equals("zh")) { + str.append(','); + } else { + str.append(','); + } + } } str.append(messageObject.messageText); if (messageObject.getSenderId() == UserConfig.getInstance(currentAccount).getClientUserId()) {