fix: 搜索页面时长筛选、快速回顶

This commit is contained in:
guozhigq
2024-01-26 23:25:06 +08:00
parent 791eed8a01
commit 0595648f4c
2 changed files with 6 additions and 4 deletions

View File

@ -90,7 +90,7 @@ class SearchVideoPanel extends StatelessWidget {
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
),
onPressed: () => controller.onShowFilterDialog(),
onPressed: () => controller.onShowFilterDialog(ctr),
icon: Icon(
Icons.filter_list_outlined,
size: 18,
@ -175,7 +175,7 @@ class VideoPanelController extends GetxController {
super.onInit();
}
onShowFilterDialog() {
onShowFilterDialog(searchPanelCtr) {
SmartDialog.show(
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
@ -199,7 +199,8 @@ class VideoPanelController extends GetxController {
SmartDialog.dismiss();
SmartDialog.showToast("${i['label']}」的筛选结果");
SearchPanelController ctr =
Get.find<SearchPanelController>(tag: 'video');
Get.find<SearchPanelController>(
tag: 'video${searchPanelCtr.keyword!}');
ctr.duration.value = i['value'];
SmartDialog.showLoading(msg: 'loooad');
await ctr.onRefresh();

View File

@ -86,7 +86,8 @@ class _SearchResultPageState extends State<SearchResultPage>
onTap: (index) {
if (index == _searchResultController!.tabIndex) {
Get.find<SearchPanelController>(
tag: SearchType.values[index].type)
tag: SearchType.values[index].type +
_searchResultController!.keyword!)
.animateToTop();
}