mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-12-13 20:19:36 +01:00
Fix unlimited accounts
This commit is contained in:
parent
854b68a3c1
commit
85aba5f968
@ -9533,7 +9533,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||
if (shouldHandle) {
|
||||
if (UserConfig.selectedAccount == currentAccount) {
|
||||
int account = -1;
|
||||
for (int a = 0; a < UserConfig.MAX_ACCOUNT_COUNT; a++) {
|
||||
for (int a : SharedConfig.activeAccounts) {
|
||||
if (UserConfig.getInstance(a).isClientActivated()) {
|
||||
account = a;
|
||||
break;
|
||||
|
@ -249,7 +249,7 @@ public class UserConfig extends BaseController {
|
||||
}
|
||||
|
||||
public static boolean isValidAccount(int num) {
|
||||
return num >= 0 && num < UserConfig.MAX_ACCOUNT_COUNT && getInstance(num).isClientActivated();
|
||||
return num >= 0 && SharedConfig.activeAccounts.contains(num) && getInstance(num).isClientActivated();
|
||||
}
|
||||
|
||||
public boolean isClientActivated() {
|
||||
|
Loading…
Reference in New Issue
Block a user