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:
parent
6f1f65d1ac
commit
68ae4ede1f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user