[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)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
libraryViewModel.getPlaylists().observe(viewLifecycleOwner, {
|
libraryViewModel.getPlaylists().observe(viewLifecycleOwner, {
|
||||||
if (it.isNotEmpty())
|
if (it.isNotEmpty())
|
||||||
adapter?.swapDataSet(it)
|
adapter?.swapDataSet(it.filter { playlistWithSongs-> playlistWithSongs.songs.isNotEmpty() })
|
||||||
else
|
else
|
||||||
adapter?.swapDataSet(listOf())
|
adapter?.swapDataSet(listOf())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue