lets show empty playlists too
This commit is contained in:
parent
f1db48ed88
commit
8450ca52d6
1 changed files with 2 additions and 2 deletions
|
@ -25,11 +25,11 @@ class PlaylistsFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
|||
|
||||
override fun setupFragment(activity: SimpleActivity) {
|
||||
ensureBackgroundThread {
|
||||
var playlists = activity.playlistDAO.getAll() as ArrayList<Playlist>
|
||||
val playlists = activity.playlistDAO.getAll() as ArrayList<Playlist>
|
||||
playlists.forEach {
|
||||
it.trackCnt = activity.tracksDAO.getTracksCountFromPlaylist(it.id)
|
||||
}
|
||||
playlists = playlists.filter { it.trackCnt != 0 }.toMutableList() as ArrayList<Playlist>
|
||||
|
||||
Playlist.sorting = activity.config.playlistSorting
|
||||
playlists.sort()
|
||||
|
||||
|
|
Loading…
Reference in a new issue