From 92369369b6cc835a9df34236956e829d78e07a39 Mon Sep 17 00:00:00 2001 From: jinyus Date: Tue, 25 Nov 2025 15:52:30 -0500 Subject: [PATCH 1/2] remove unnecessary bool comparison --- lib/podcasts/podcast_service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/podcasts/podcast_service.dart b/lib/podcasts/podcast_service.dart index 7459097..9c551de 100644 --- a/lib/podcasts/podcast_service.dart +++ b/lib/podcasts/podcast_service.dart @@ -52,7 +52,7 @@ class PodcastService { }) async { SearchResult res; try { - if (searchQuery == null || searchQuery.isEmpty == true) { + if (searchQuery == null || searchQuery.isEmpty) { res = await _search.charts( genre: podcastGenre == PodcastGenre.all ? '' : podcastGenre.id, limit: limit, @@ -72,7 +72,7 @@ class PodcastService { attribute: attribute, ); } - if (res.successful == false) { + if (!res.successful) { throw Exception( 'Search failed: ${res.lastError} ${res.lastErrorType.name}', ); From ffc9ed708cef2a948f9afe0c84f1937b322151cf Mon Sep 17 00:00:00 2001 From: jinyus Date: Fri, 28 Nov 2025 03:09:45 -0500 Subject: [PATCH 2/2] remove unnecessary code --- lib/online_art/online_art_service.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/online_art/online_art_service.dart b/lib/online_art/online_art_service.dart index 1707a75..78615d1 100644 --- a/lib/online_art/online_art_service.dart +++ b/lib/online_art/online_art_service.dart @@ -59,9 +59,8 @@ class OnlineArtService { final _store = {}; String? put({required String key, String? url}) { - return _store.containsKey(key) - ? _store.update(key, (value) => url) - : _store.putIfAbsent(key, () => url); + _store[key] = url; + return url; } String? get(String? icyTitle) => icyTitle == null ? null : _store[icyTitle];