diff --git a/lib/src/podcasts/view/podcast_page.dart b/lib/src/podcasts/view/podcast_page.dart index a72e5ab78..6575861dd 100644 --- a/lib/src/podcasts/view/podcast_page.dart +++ b/lib/src/podcasts/view/podcast_page.dart @@ -41,13 +41,13 @@ class PodcastPage extends StatelessWidget with WatchItMixin { .toSet() ?? {}; - void onTap(text) { + Future onTap(text) async { final podcastModel = di(); Navigator.of(context).maybePop(); - di().setIndex(2); podcastModel.setSearchActive(true); podcastModel.setSearchQuery(text); - podcastModel.search(searchQuery: text); + await podcastModel.search(searchQuery: text); + di().setIndex(2); } return YaruDetailPage( diff --git a/lib/src/podcasts/view/podcasts_discover_grid.dart b/lib/src/podcasts/view/podcasts_discover_grid.dart index 86a3fc88a..2a9ea5ed7 100644 --- a/lib/src/podcasts/view/podcasts_discover_grid.dart +++ b/lib/src/podcasts/view/podcasts_discover_grid.dart @@ -43,7 +43,7 @@ class _PodcastsDiscoverGridState extends State { final setLimit = model.setLimit; Future incrementLimit() async { setLimit(limit + 20); - await model.search(); + await model.search(searchQuery: model.searchQuery); } if (searchResult == null || widget.checkingForUpdates) {