mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
tweak (#1325)
* tweak * opt: async * tweak * opt: PopularSeries tile * tweak * opt: sc * mod: more account type * tweak * opt: qrcode * tweak * partial revert: opt: sc * fix * fix * mod: window enqueue
This commit is contained in:
committed by
GitHub
parent
67c25bd130
commit
4ae3bd2845
@@ -24,33 +24,36 @@ abstract class GStorage {
|
||||
final String path = dir.path;
|
||||
await Hive.initFlutter('$path/hive');
|
||||
regAdapter();
|
||||
// 登录用户信息
|
||||
userInfo = await Hive.openBox<UserInfoData>(
|
||||
'userInfo',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 2;
|
||||
},
|
||||
);
|
||||
// 本地缓存
|
||||
localCache = await Hive.openBox(
|
||||
'localCache',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 4;
|
||||
},
|
||||
);
|
||||
// 设置
|
||||
setting = await Hive.openBox('setting');
|
||||
// 搜索历史
|
||||
historyWord = await Hive.openBox(
|
||||
'historyWord',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 10;
|
||||
},
|
||||
);
|
||||
// 视频设置
|
||||
video = await Hive.openBox('video');
|
||||
|
||||
await Accounts.init();
|
||||
await Future.wait([
|
||||
// 登录用户信息
|
||||
Hive.openBox<UserInfoData>(
|
||||
'userInfo',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 2;
|
||||
},
|
||||
).then((res) => userInfo = res),
|
||||
// 本地缓存
|
||||
Hive.openBox(
|
||||
'localCache',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 4;
|
||||
},
|
||||
).then((res) => localCache = res),
|
||||
// 设置
|
||||
Hive.openBox('setting').then((res) => setting = res),
|
||||
// 搜索历史
|
||||
Hive.openBox(
|
||||
'historyWord',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 10;
|
||||
},
|
||||
).then((res) => historyWord = res),
|
||||
// 视频设置
|
||||
Hive.openBox('video').then((res) => video = res),
|
||||
|
||||
Accounts.init(),
|
||||
]);
|
||||
}
|
||||
|
||||
static String exportAllSettings() {
|
||||
|
||||
Reference in New Issue
Block a user