mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
feat: load config from text (#1772)
* feat: load config from text * opt: login utils * update Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me> --------- Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
committed by
GitHub
parent
b4daf5fbd8
commit
244ef22f54
@@ -106,9 +106,9 @@ abstract class Accounts {
|
||||
}
|
||||
|
||||
static Future<void> set(AccountType key, Account account) async {
|
||||
await (accountMode[key.index]..type.remove(key)).onChange();
|
||||
final oldAccount = accountMode[key.index]..type.remove(key);
|
||||
accountMode[key.index] = account..type.add(key);
|
||||
await account.onChange();
|
||||
await Future.wait([account.onChange(), oldAccount.onChange()]);
|
||||
if (!account.activated) await Request.buvidActive(account);
|
||||
switch (key) {
|
||||
case AccountType.main:
|
||||
|
||||
Reference in New Issue
Block a user