From 2be24e32ad97c6df9eab205ebe1256d149d3c71f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Font=C3=A1n?= Date: Thu, 15 Aug 2024 18:05:37 +0200 Subject: [PATCH] fix/Spotify: App crashes when there's no internet connection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added a loading state for the Spotify track search. - Updated the Spotify search service to handle pagination. - Added error handling for Spotify track search. Signed-off-by: Gabriel Fontán --- .idea/gradle.xml | 1 + .../spotify/data/remote/SpotifyServiceImpl.kt | 3 +- .../remote/search/SpotifySearchServiceImpl.kt | 24 +++++ .../data/repository/SearchRepositoryImpl.kt | 16 ++- .../services/search/SpotifySearchService.kt | 7 ++ .../tageditor/spotify/MetadataBsVM.kt | 55 +++++------ .../spotify/stages/SpMetadataBsSearch.kt | 98 +++++++++++++------ app/src/main/res/values/strings.xml | 1 + .../ui/components/state/LoadingState.kt | 37 +++++++ 9 files changed, 167 insertions(+), 75 deletions(-) create mode 100644 app/ui/src/main/java/com/bobbyesp/ui/components/state/LoadingState.kt diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 0fda7b4..5fc23f8 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,6 +4,7 @@