mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
opt history account
Closes #948 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -16,6 +16,13 @@ class Accounts {
|
||||
static final Map<AccountType, Account> accountMode = {};
|
||||
static Account get main => accountMode[AccountType.main]!;
|
||||
static Account get heartbeat => accountMode[AccountType.heartbeat]!;
|
||||
static Account get history {
|
||||
final heartbeat = Accounts.heartbeat;
|
||||
if (heartbeat is AnonymousAccount) {
|
||||
return Accounts.main;
|
||||
}
|
||||
return heartbeat;
|
||||
}
|
||||
// static set main(Account account) => set(AccountType.main, account);
|
||||
|
||||
static Future<void> init() async {
|
||||
|
||||
@@ -29,13 +29,13 @@ class AccountManager extends Interceptor {
|
||||
Api.heartBeat,
|
||||
Api.historyReport,
|
||||
Api.roomEntryAction,
|
||||
Api.historyList,
|
||||
Api.pauseHistory,
|
||||
Api.clearHistory,
|
||||
Api.delHistory,
|
||||
Api.searchHistory,
|
||||
Api.historyStatus,
|
||||
Api.mediaListHistory,
|
||||
// Api.historyList,
|
||||
// Api.pauseHistory,
|
||||
// Api.clearHistory,
|
||||
// Api.delHistory,
|
||||
// Api.searchHistory,
|
||||
// Api.historyStatus,
|
||||
// Api.mediaListHistory,
|
||||
// progress
|
||||
Api.pgcInfo,
|
||||
Api.pugvInfo,
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:PiliPlus/utils/storage_key.dart';
|
||||
|
||||
class Data {
|
||||
static Future<void> init() async {
|
||||
if (!Accounts.main.isLogin) {
|
||||
if (!Accounts.history.isLogin) {
|
||||
return;
|
||||
}
|
||||
var res = await UserHttp.historyStatus();
|
||||
|
||||
Reference in New Issue
Block a user