fix: video Storage初始化

This commit is contained in:
guozhigq
2024-02-11 18:47:51 +08:00
parent 10b928474b
commit e2fd01a6d5
2 changed files with 2 additions and 6 deletions

View File

@ -70,7 +70,6 @@ void main() async {
statusBarColor: Colors.transparent, statusBarColor: Colors.transparent,
)); ));
Data.init(); Data.init();
GStrorage.lazyInit();
PiliSchame.init(); PiliSchame.init();
}); });
} }

View File

@ -42,6 +42,8 @@ class GStrorage {
return deletedEntries > 10; return deletedEntries > 10;
}, },
); );
// 视频设置
video = await Hive.openBox('video');
} }
static void regAdapter() { static void regAdapter() {
@ -52,11 +54,6 @@ class GStrorage {
Hive.registerAdapter(HotSearchItemAdapter()); Hive.registerAdapter(HotSearchItemAdapter());
} }
static Future<void> lazyInit() async {
// 视频设置
video = await Hive.openBox('video');
}
static Future<void> close() async { static Future<void> close() async {
// user.compact(); // user.compact();
// user.close(); // user.close();