fix: getRealChannelAdminCount

This commit is contained in:
blxueya 2022-07-14 23:39:33 +08:00
parent 67bac0f724
commit f02d0a94d1
No known key found for this signature in database
GPG Key ID: 8A97C412EC2B4730

View File

@ -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);
}