Skip to content

Commit

Permalink
Trim search term on episode filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
amugofjava committed Oct 12, 2024
1 parent eb8dcb7 commit 759a0c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/bloc/podcast/podcast_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class PodcastBloc extends Bloc {
/// Listen to Podcast subscription, mark/cleared played events
_listenPodcastStateEvents();

/// Listen for episode search requests
_listenPodcastSearchEvents();
}

Expand Down Expand Up @@ -422,7 +423,7 @@ class PodcastBloc extends Bloc {
_episodesStream.add(_episodes);
} else {
var searchFilteredEpisodes =
_episodes.where((e) => e.title!.toLowerCase().contains(_searchTerm.toLowerCase())).toList();
_episodes.where((e) => e.title!.toLowerCase().contains(_searchTerm.trim().toLowerCase())).toList();
_episodesStream.add(searchFilteredEpisodes);
}
}
Expand Down
5 changes: 4 additions & 1 deletion lib/ui/widgets/sync_spinner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class _SyncSpinnerState extends State<SyncSpinner> with SingleTickerProviderStat
duration: const Duration(milliseconds: 1500),
)..repeat();

_child = const Icon(Icons.refresh);
_child = const Icon(
Icons.refresh,
size: 16.0,
);

final podcastBloc = Provider.of<PodcastBloc>(context, listen: false);

Expand Down

0 comments on commit 759a0c9

Please sign in to comment.