From f02d0a94d112f3f4a277be401cdd7fa089562e6a Mon Sep 17 00:00:00 2001 From: blxueya Date: Thu, 14 Jul 2022 23:39:33 +0800 Subject: [PATCH] fix: getRealChannelAdminCount --- .../src/main/java/org/telegram/ui/ChatEditActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java index 4b42ef0b1..f832bae91 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatEditActivity.java @@ -1145,9 +1145,12 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image req.channel = getMessagesController().getInputChannel(chatId); req.filter = new TLRPC.TL_channelParticipantsAdmins(); int reqId = getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { + if (adminCell == null || response == null) { + return; + } TLRPC.TL_channels_channelParticipants res = (TLRPC.TL_channels_channelParticipants) response; realAdminCount = res.count; - adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", res.count), R.drawable.msg_admins, true); + adminCell.setTextAndValueAndIcon(LocaleController.getString("ChannelAdministrators", R.string.ChannelAdministrators), String.format("%d", res.count), R.drawable.msg_admin_add, true); })); getConnectionsManager().bindRequestToGuid(reqId, classGuid); }