mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
fix #1061
opt `FollowingsFollowedUpper` url Closes #1061 Closes #1062 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -14,7 +14,7 @@ import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class GStorage {
|
||||
static late final Box<UserInfoData> userInfo;
|
||||
static late final Box<List<String>> historyWord;
|
||||
static late final Box<dynamic> historyWord;
|
||||
static late final Box<dynamic> localCache;
|
||||
static late final Box<dynamic> setting;
|
||||
static late final Box<dynamic> video;
|
||||
@@ -41,7 +41,7 @@ class GStorage {
|
||||
// 设置
|
||||
setting = await Hive.openBox('setting');
|
||||
// 搜索历史
|
||||
historyWord = await Hive.openBox<List<String>>(
|
||||
historyWord = await Hive.openBox(
|
||||
'historyWord',
|
||||
compactionStrategy: (int entries, int deletedEntries) {
|
||||
return deletedEntries > 10;
|
||||
@@ -63,11 +63,12 @@ class GStorage {
|
||||
static Future<void> importAllSettings(String data) =>
|
||||
importAllJsonSettings(jsonDecode(data));
|
||||
|
||||
static Future<void> importAllJsonSettings(Map<String, dynamic> map) async {
|
||||
static Future<bool> importAllJsonSettings(Map<String, dynamic> map) async {
|
||||
await setting.clear();
|
||||
await video.clear();
|
||||
await setting.putAll(map[setting.name]);
|
||||
await video.putAll(map[video.name]);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void regAdapter() {
|
||||
|
||||
Reference in New Issue
Block a user