mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: search ctr
related #306 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -32,11 +32,15 @@ class _SearchResultPageState extends State<SearchResultPage>
|
||||
vsync: this,
|
||||
initialIndex: Get.arguments is int ? Get.arguments : 0,
|
||||
length: SearchType.values.length,
|
||||
)..addListener(() {
|
||||
);
|
||||
|
||||
if (Get.arguments is int) {
|
||||
_tabController.addListener(() {
|
||||
if (Get.isRegistered<SSearchController>()) {
|
||||
Get.find<SSearchController>().initIndex = _tabController.index;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -110,8 +114,7 @@ class _SearchResultPageState extends State<SearchResultPage>
|
||||
onTap: (index) {
|
||||
if (_tabController.indexIsChanging.not) {
|
||||
Get.find<SearchPanelController>(
|
||||
tag: SearchType.values[index].name +
|
||||
_searchResultController.keyword)
|
||||
tag: SearchType.values[index].name + _tag)
|
||||
.animateToTop();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user