diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java b/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java index 86d2624eb6..dbb3b54aa1 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ContactsController.java @@ -3039,7 +3039,7 @@ public static String formatName(String firstName, String lastName, int maxLength result.append(firstName); } } - return MessageHelper.INSTANCE.zalgoFilter(result); + return MessageHelper.INSTANCE.zalgoFilter(result.toString()); } private class PhoneBookContact { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 035d89313c..a08a0800b3 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -8479,7 +8479,7 @@ private void showBotMessageHint(ChatMessageCell cell, boolean byClick) { botMessageHint.show(); }); } - + private void hideHints() { if (savedMessagesTagHint != null && savedMessagesTagHint.shown()) { savedMessagesTagHint.hide(); @@ -13885,8 +13885,9 @@ public void showFieldPanel(boolean show, MessageObject messageObjectToReply, Mes } nameText = AndroidUtilities.replaceCharSequence("%s", LocaleController.getString(R.string.ReplyTo), name == null ? "" : name); } + nameText = MessageHelper.INSTANCE.zalgoFilter(nameText); nameText = Emoji.replaceEmoji(nameText, replyNameTextView.getPaint().getFontMetricsInt(), false); - replyNameTextView.setText(MessageHelper.INSTANCE.zalgoFilter(name)); + replyNameTextView.setText(nameText); replyIconImageView.setContentDescription(LocaleController.getString("AccDescrReplying", R.string.AccDescrReplying)); replyCloseImageView.setContentDescription(LocaleController.getString("AccDescrCancelReply", R.string.AccDescrCancelReply)); @@ -39641,7 +39642,7 @@ public void updateClip(int[] clip) { clip[1] = chatListView.getMeasuredHeight() - (chatListView.getPaddingBottom() - AndroidUtilities.dp(3)); } } - + private void updateVisibleWallpaperActions() { if (chatListView != null && chatAdapter != null) { for (int i = 0; i < chatListView.getChildCount(); ++i) { diff --git a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/helper/MessageHelper.kt b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/helper/MessageHelper.kt index 223a4e297a..6177c6277e 100644 --- a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/helper/MessageHelper.kt +++ b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/helper/MessageHelper.kt @@ -137,20 +137,14 @@ object MessageHelper { } fun zalgoFilter( - text: CharSequence? + text: String ): String { - return if (text == null) { - "" - } else { - zalgoFilter( - text.toString() - ) - } + return zalgoFilter(text as CharSequence).toString() } fun zalgoFilter( - text: String? - ): String { + text: CharSequence? + ): CharSequence { return if (text == null) { "" } else if (NaConfig.zalgoFilter.Bool() && text.matches(