1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-11-11 00:49:14 +01:00

try fix admin count

This commit is contained in:
luvletter2333 2022-07-27 21:12:06 +08:00
parent 6f1f65d1ac
commit 68ae4ede1f
No known key found for this signature in database
GPG Key ID: A26A8880836E1978

View File

@ -1142,7 +1142,10 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
private int getChannelAdminCount() {
if (info == null || info.participants == null || info.participants.participants == null) {
return 1;
if (realAdminCount != 0)
return realAdminCount;
getRealChannelAdminCount();
return 0;
}
int count = 0;
for (int a = 0, N = info.participants.participants.size(); a < N; a++) {
@ -1153,10 +1156,10 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
count++;
}
}
realAdminCount = count;
return count;
}
@Deprecated
private void getRealChannelAdminCount() {
TLRPC.TL_channels_getParticipants req = new TLRPC.TL_channels_getParticipants();
req.channel = getMessagesController().getInputChannel(chatId);