From 616cee55a75e4feb147de9aa22605c3abf5d0037 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 12 Aug 2023 22:22:42 +0800 Subject: [PATCH] fix: ShowSendAsUnderMessageHint --- .../org/telegram/ui/Components/ChatActivityEnterView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java index d02eae5eaa..c2af41849e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java @@ -5916,17 +5916,17 @@ public void updateFieldHint(boolean animated) { } } if (NaConfig.INSTANCE.getShowSendAsUnderMessageHint().Bool() && delegate != null) { - TLRPC.ChatFull full = parentFragment.getMessagesController().getChatFull(-dialog_id); + TLRPC.ChatFull full = accountInstance.getMessagesController().getChatFull(-dialog_id); TLRPC.Peer defPeer = full != null ? full.default_send_as : null; if (defPeer == null && delegate.getSendAsPeers() != null && !delegate.getSendAsPeers().peers.isEmpty()) { defPeer = delegate.getSendAsPeers().peers.get(0).peer; } if (defPeer != null) { if (defPeer.channel_id != 0) { - TLRPC.Chat ch = MessagesController.getInstance(currentAccount).getChat(defPeer.channel_id); + TLRPC.Chat ch = accountInstance.getMessagesController().getChat(defPeer.channel_id); sendAsText = new SpannableString(ch != null ? "\nas " + ch.title : ""); } else { - TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(defPeer.user_id); + TLRPC.User user = accountInstance.getMessagesController().getUser(defPeer.user_id); sendAsText = new SpannableString(user != null ? "\nas " + UserObject.getUserName(user) : ""); } }