Added show empty in home

This commit is contained in:
h4h13 2019-06-22 23:14:21 +05:30
parent 647e5b2d3f
commit d2804bdcd4
11 changed files with 77 additions and 55 deletions

View file

@ -87,11 +87,9 @@ object TopAndRecentlyPlayedTracksLoader {
val songs = SongPlayCountStore.getInstance(context)
.getTopPlayedResults(NUMBER_OF_TOP_TRACKS)
try {
return makeSortedCursor(context, songs,
songs!!.getColumnIndex(SongPlayCountStore.SongPlayCountColumns.ID))
} finally {
songs?.close()
songs.use { localSongs ->
return makeSortedCursor(context, localSongs,
localSongs.getColumnIndex(SongPlayCountStore.SongPlayCountColumns.ID))
}
}