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:44:13 +04:00
parent 28c448046f
commit 95ada5e1a7

View File

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