feat: 调整设置,支持导入导出,代码优化

This commit is contained in:
orz12
2024-04-27 02:05:50 +08:00
parent a4d3713b05
commit ea8f44f4da
41 changed files with 882 additions and 424 deletions

View File

@@ -68,7 +68,7 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
void setTabConfig() async {
defaultTabs = [...tabsConfig];
tabbarSort = settingStorage.get(SettingBoxKey.tabbarSort,
defaultValue: ['live', 'rcmd', 'hot', 'bangumi']);
defaultValue: ['live', 'rcmd', 'hot', 'bangumi']).map<String>((i) => i.toString()).toList();
defaultTabs.retainWhere(
(item) => tabbarSort.contains((item['type'] as TabType).id));
defaultTabs.sort((a, b) => tabbarSort