mod: 取消热搜缓存、增加刷新功能

This commit is contained in:
guozhigq
2023-08-22 12:27:02 +08:00
parent 9e44995082
commit b7c0ef8341
3 changed files with 39 additions and 40 deletions

View File

@ -9,7 +9,6 @@ import 'package:pilipala/models/user/info.dart';
class GStrorage {
static late final Box recVideo;
static late final Box userInfo;
static late final Box hotKeyword;
static late final Box historyword;
static late final Box localCache;
static late final Box setting;
@ -38,13 +37,6 @@ class GStrorage {
localCache = await Hive.openBox('localCache');
// 设置
setting = await Hive.openBox('setting');
// 热搜关键词
hotKeyword = await Hive.openBox(
'hotKeyword',
compactionStrategy: (entries, deletedEntries) {
return deletedEntries > 10;
},
);
// 搜索历史
historyword = await Hive.openBox(
'historyWord',
@ -78,8 +70,6 @@ class GStrorage {
recVideo.close();
userInfo.compact();
userInfo.close();
hotKeyword.compact();
hotKeyword.close();
historyword.compact();
historyword.close();
localCache.compact();