From 038e872e7a725353cb0a92e76ec16062d93fd1be Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Thu, 13 Aug 2020 23:43:32 +0530 Subject: [PATCH] Update RealRepository.kt --- .../monkey/retromusic/repository/RealRepository.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/repository/RealRepository.kt b/app/src/main/java/code/name/monkey/retromusic/repository/RealRepository.kt index 7b6000cd..327593ae 100644 --- a/app/src/main/java/code/name/monkey/retromusic/repository/RealRepository.kt +++ b/app/src/main/java/code/name/monkey/retromusic/repository/RealRepository.kt @@ -74,6 +74,8 @@ interface Repository { suspend fun genresHome(): Home + suspend fun playlists(): Home + suspend fun homeSections(): List suspend fun homeSectionsFlow(): Flow>> @@ -189,8 +191,7 @@ class RealRepository( recentArtistsHome(), recentAlbumsHome(), suggestionsHome(), - favoritePlaylistHome(), - genresHome() + favoritePlaylistHome() ) for (section in sections) { if (section.arrayList.isNotEmpty()) { @@ -201,12 +202,12 @@ class RealRepository( return homeSections } - suspend fun playlists(): Home { + override suspend fun playlists(): Home { val playlist = playlistRepository.playlists() return Home(playlist, TOP_ALBUMS) } - suspend fun playlists(playlistId: Int) = + override suspend fun playlist(playlistId: Int) = playlistRepository.playlist(playlistId) override suspend fun suggestionsHome(): Home { @@ -303,7 +304,4 @@ class RealRepository( emit(Result.Success(data)) } } - - override suspend fun playlist(playlistId: Int): Playlist = - playlistRepository.playlist(playlistId) } \ No newline at end of file