properly sort items at TracksActivity at initial loading too
This commit is contained in:
parent
491efa549f
commit
12621e6d97
1 changed files with 10 additions and 2 deletions
|
@ -100,7 +100,11 @@ class TracksActivity : SimpleActivity() {
|
||||||
val playlistTracks = tracksDAO.getTracksFromPlaylist(playlist!!.id).map { track ->
|
val playlistTracks = tracksDAO.getTracksFromPlaylist(playlist!!.id).map { track ->
|
||||||
track.title = track.getProperTitle(showFilename)
|
track.title = track.getProperTitle(showFilename)
|
||||||
track
|
track
|
||||||
}
|
} as ArrayList<Track>
|
||||||
|
|
||||||
|
Track.sorting = config.playlistTracksSorting
|
||||||
|
playlistTracks.sort()
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
tracks_placeholder.beVisibleIf(playlistTracks.isEmpty())
|
tracks_placeholder.beVisibleIf(playlistTracks.isEmpty())
|
||||||
tracks_placeholder_2.beVisibleIf(playlistTracks.isEmpty())
|
tracks_placeholder_2.beVisibleIf(playlistTracks.isEmpty())
|
||||||
|
@ -123,7 +127,11 @@ class TracksActivity : SimpleActivity() {
|
||||||
val folderTracks = tracksDAO.getTracksFromFolder(folder ?: "").map { track ->
|
val folderTracks = tracksDAO.getTracksFromFolder(folder ?: "").map { track ->
|
||||||
track.title = track.getProperTitle(showFilename)
|
track.title = track.getProperTitle(showFilename)
|
||||||
track
|
track
|
||||||
}
|
} as ArrayList<Track>
|
||||||
|
|
||||||
|
Track.sorting = config.playlistTracksSorting
|
||||||
|
folderTracks.sort()
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
tracks_placeholder.beVisibleIf(folderTracks.isEmpty())
|
tracks_placeholder.beVisibleIf(folderTracks.isEmpty())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue