mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-25 18:48:43 +00:00
@@ -77,7 +77,7 @@ abstract class Accounts {
|
||||
}
|
||||
}
|
||||
await Future.wait(
|
||||
(accountMode.toSet()..removeWhere((i) => i.activited)).map(
|
||||
(accountMode.toSet()..removeWhere((i) => i.activated)).map(
|
||||
Request.buvidActive,
|
||||
),
|
||||
);
|
||||
@@ -93,14 +93,14 @@ abstract class Accounts {
|
||||
}
|
||||
|
||||
static Future<void> deleteAll(Set<Account> accounts) async {
|
||||
var isloginMain = Accounts.main.isLogin;
|
||||
var isLoginMain = Accounts.main.isLogin;
|
||||
for (int i = 0; i < AccountType.values.length; i++) {
|
||||
if (accounts.contains(accountMode[i])) {
|
||||
accountMode[i] = AnonymousAccount();
|
||||
}
|
||||
}
|
||||
await Future.wait(accounts.map((i) => i.delete()));
|
||||
if (isloginMain && !Accounts.main.isLogin) {
|
||||
if (isLoginMain && !Accounts.main.isLogin) {
|
||||
await LoginUtils.onLogoutMain();
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ abstract class Accounts {
|
||||
await (accountMode[key.index]..type.remove(key)).onChange();
|
||||
accountMode[key.index] = account..type.add(key);
|
||||
await account.onChange();
|
||||
if (!account.activited) await Request.buvidActive(account);
|
||||
if (!account.activated) await Request.buvidActive(account);
|
||||
switch (key) {
|
||||
case AccountType.main:
|
||||
await (account.isLogin
|
||||
|
||||
Reference in New Issue
Block a user