mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: search from tag
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -39,6 +39,9 @@ class SSearchController extends GetxController {
|
||||
if (Get.parameters['hintText'] != null) {
|
||||
hintText = Get.parameters['hintText']!;
|
||||
}
|
||||
if (Get.parameters['text'] != null) {
|
||||
controller.text = Get.parameters['text']!;
|
||||
}
|
||||
}
|
||||
|
||||
historyList.value = List.from(GStorage.historyWord.get('cacheList') ?? []);
|
||||
|
||||
@@ -63,12 +63,23 @@ class _SearchResultPageState extends State<SearchResultPage>
|
||||
),
|
||||
),
|
||||
title: GestureDetector(
|
||||
onTap: Get.back,
|
||||
onTap: () {
|
||||
if (Get.previousRoute.startsWith('/search')) {
|
||||
Get.back();
|
||||
} else {
|
||||
Get.offNamed(
|
||||
'/search',
|
||||
parameters: {'text': _searchResultController.keyword},
|
||||
);
|
||||
}
|
||||
},
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: Text(
|
||||
_searchResultController.keyword,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
maxLines: 1,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user