fix: video Storage初始化
This commit is contained in:
@ -70,7 +70,6 @@ void main() async {
|
|||||||
statusBarColor: Colors.transparent,
|
statusBarColor: Colors.transparent,
|
||||||
));
|
));
|
||||||
Data.init();
|
Data.init();
|
||||||
GStrorage.lazyInit();
|
|
||||||
PiliSchame.init();
|
PiliSchame.init();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user