From 015b1f90868889c783d062fd4defbf422985b923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 13 Apr 2021 14:41:58 +0800 Subject: [PATCH] Allow direct send to linked group --- .../java/org/telegram/ui/ChatActivity.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 06b809060..dc638147e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -16891,12 +16891,19 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not chatActivityEnterView.setFieldFocused(); AndroidUtilities.runOnUIThread(() -> chatActivityEnterView.openKeyboard(), 100); } else { - bottomOverlayChat.setVisibility(View.VISIBLE); - chatActivityEnterView.setFieldFocused(false); - chatActivityEnterView.setVisibility(View.INVISIBLE); - chatActivityEnterView.closeKeyboard(); - if (stickersAdapter != null) { - stickersAdapter.hide(); + boolean showEnter = false; + if (currentChat != null && currentChat.megagroup && chatInfo != null && chatInfo.linked_chat_id != 0) { + TLRPC.Chat linked = getMessagesController().getChat(chatInfo.linked_chat_id); + showEnter = !ChatObject.isKickedFromChat(linked); + } + if (!showEnter) { + bottomOverlayChat.setVisibility(View.VISIBLE); + chatActivityEnterView.setFieldFocused(false); + chatActivityEnterView.setVisibility(View.INVISIBLE); + chatActivityEnterView.closeKeyboard(); + if (stickersAdapter != null) { + stickersAdapter.hide(); + } } } if (attachItem != null) {