mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
fix search, locale
This commit is contained in:
@@ -42,10 +42,14 @@ class _SearchResultPageState extends State<SearchResultPage> {
|
||||
|
||||
void search([String? text]) {
|
||||
if (text != null) {
|
||||
if(suggestionsController.entry != null) {
|
||||
suggestionsController.remove();
|
||||
}
|
||||
setState(() {
|
||||
this.text = text;
|
||||
});
|
||||
appdata.addSearchHistory(text);
|
||||
controller.currentText = text;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,10 +84,18 @@ class _SearchResultPageState extends State<SearchResultPage> {
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
Future.microtask(() {
|
||||
suggestionsController.remove();
|
||||
});
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
controller = SearchBarController(
|
||||
initialText: widget.text,
|
||||
currentText: widget.text,
|
||||
onSearch: search,
|
||||
);
|
||||
sourceKey = widget.sourceKey;
|
||||
|
Reference in New Issue
Block a user