From e2fd01a6d5154d3f068a60b0bbecad3420447c04 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 11 Feb 2024 18:47:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20video=20Storage=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 1 - lib/utils/storage.dart | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 5849f8a3..fc2149de 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -70,7 +70,6 @@ void main() async { statusBarColor: Colors.transparent, )); Data.init(); - GStrorage.lazyInit(); PiliSchame.init(); }); } diff --git a/lib/utils/storage.dart b/lib/utils/storage.dart index 1b0b0c37..41ec0ce8 100644 --- a/lib/utils/storage.dart +++ b/lib/utils/storage.dart @@ -42,6 +42,8 @@ class GStrorage { return deletedEntries > 10; }, ); + // 视频设置 + video = await Hive.openBox('video'); } static void regAdapter() { @@ -52,11 +54,6 @@ class GStrorage { Hive.registerAdapter(HotSearchItemAdapter()); } - static Future lazyInit() async { - // 视频设置 - video = await Hive.openBox('video'); - } - static Future close() async { // user.compact(); // user.close();