mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
chore: rename tabsConfig
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -73,7 +73,7 @@ class HomeController extends GetxController
|
||||
}
|
||||
|
||||
Future<void> setTabConfig() async {
|
||||
final defaultTabs = [...tabsConfig];
|
||||
final defaultTabs = [...homeTabsConfig];
|
||||
final tabbarSort = GStorage.tabbarSort;
|
||||
defaultTabs
|
||||
..retainWhere(
|
||||
|
||||
@@ -12,7 +12,7 @@ class RankController extends GetxController
|
||||
late TabController tabController;
|
||||
|
||||
ZoneController get controller {
|
||||
final item = tabsConfig[tabController.index];
|
||||
final item = rankTabsConfig[tabController.index];
|
||||
return Get.find<ZoneController>(
|
||||
tag: '${item['rid']}${item['season_type']}');
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class RankController extends GetxController
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
tabController = TabController(length: tabsConfig.length, vsync: this);
|
||||
tabController = TabController(length: rankTabsConfig.length, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -32,7 +32,7 @@ class _RankPageState extends State<RankPage>
|
||||
),
|
||||
child: Column(
|
||||
children: List.generate(
|
||||
tabsConfig.length,
|
||||
rankTabsConfig.length,
|
||||
(index) => Obx(
|
||||
() => IntrinsicHeight(
|
||||
child: InkWell(
|
||||
@@ -65,7 +65,7 @@ class _RankPageState extends State<RankPage>
|
||||
padding:
|
||||
const EdgeInsets.symmetric(vertical: 7),
|
||||
child: Text(
|
||||
tabsConfig[index]['label'],
|
||||
rankTabsConfig[index]['label'],
|
||||
style: TextStyle(
|
||||
color:
|
||||
index == _rankController.tabIndex.value
|
||||
@@ -92,7 +92,7 @@ class _RankPageState extends State<RankPage>
|
||||
child: TabBarView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
controller: _rankController.tabController,
|
||||
children: tabsConfig
|
||||
children: rankTabsConfig
|
||||
.map((item) => ZonePage(
|
||||
rid: item['rid'],
|
||||
seasonType: item['season_type'],
|
||||
|
||||
@@ -17,7 +17,7 @@ class _TabbarSetPageState extends State<TabbarSetPage> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
defaultTabs = tabsConfig;
|
||||
defaultTabs = homeTabsConfig;
|
||||
tabbarSort = GStorage.tabbarSort;
|
||||
// 对 tabData 进行排序
|
||||
defaultTabs.sort((a, b) {
|
||||
|
||||
Reference in New Issue
Block a user