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) {
|
if (Get.parameters['hintText'] != null) {
|
||||||
hintText = Get.parameters['hintText']!;
|
hintText = Get.parameters['hintText']!;
|
||||||
}
|
}
|
||||||
|
if (Get.parameters['text'] != null) {
|
||||||
|
controller.text = Get.parameters['text']!;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
historyList.value = List.from(GStorage.historyWord.get('cacheList') ?? []);
|
historyList.value = List.from(GStorage.historyWord.get('cacheList') ?? []);
|
||||||
|
|||||||
@@ -63,12 +63,23 @@ class _SearchResultPageState extends State<SearchResultPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: GestureDetector(
|
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(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: Text(
|
child: Text(
|
||||||
_searchResultController.keyword,
|
_searchResultController.keyword,
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user