fix bug when after search button "To top" is shown when list was already at top

This commit is contained in:
shirotame 2024-10-06 18:45:33 +04:00
parent 95ada5e1a7
commit 0d40fa5045

View File

@ -91,12 +91,14 @@ class _BodyState extends State<Body> {
placeholder: context.locale.search,
controller: searchController,
onChanged: (search) {
context
.read<HomeBloc>()
.add(HomeShowButtonToTopEvent(isShown: false));
Debounce.run(() => context
.read<HomeBloc>()
.add(HomeLoadDataEvent(search: search)));
Debounce.run(() {
context
.read<HomeBloc>()
.add(HomeShowButtonToTopEvent(isShown: false));
context
.read<HomeBloc>()
.add(HomeLoadDataEvent(search: search));
});
},
),
),