[Playlists] Filtering Empty playlists e.g. Favorites
This commit is contained in:
parent
a78100c0ea
commit
ca9c3124f1
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue