[Playlists] Filtering Empty playlists e.g. Favorites
parent
a78100c0ea
commit
ca9c3124f1
|
@ -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())
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue