1
0
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:
luvletter2333 2021-05-04 10:54:39 +08:00
parent 854b68a3c1
commit 85aba5f968
No known key found for this signature in database
GPG Key ID: BFD68B892BECC1D8
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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() {