[Playlists] Filtering Empty playlists e.g. Favorites

main
Prathamesh More 2021-11-28 18:48:20 +05:30
parent a78100c0ea
commit ca9c3124f1
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class PlaylistsFragment :
super.onViewCreated(view, savedInstanceState)
libraryViewModel.getPlaylists().observe(viewLifecycleOwner, {
if (it.isNotEmpty())
adapter?.swapDataSet(it)
adapter?.swapDataSet(it.filter { playlistWithSongs-> playlistWithSongs.songs.isNotEmpty() })
else
adapter?.swapDataSet(listOf())
})