do not block the Track loading at updating covers
This commit is contained in:
parent
ed1ba076d2
commit
b426209de0
1 changed files with 7 additions and 7 deletions
|
@ -37,13 +37,6 @@ class TracksFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||
}
|
||||
tracks.sortWith { o1, o2 -> AlphanumericComparator().compare(o1.title.toLowerCase(), o2.title.toLowerCase()) }
|
||||
|
||||
if (!context.config.wereCoversUpdated) {
|
||||
tracks.filter { it.coverArt.isNotEmpty() }.forEach {
|
||||
activity.tracksDAO.updateCoverArt(it.coverArt, it.id)
|
||||
}
|
||||
context.config.wereCoversUpdated = true
|
||||
}
|
||||
|
||||
activity.runOnUiThread {
|
||||
tracks_placeholder.beVisibleIf(tracks.isEmpty())
|
||||
val adapter = TracksAdapter(activity, tracks, false, tracks_list, tracks_fastscroller) {
|
||||
|
@ -63,6 +56,13 @@ class TracksFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
|
|||
tracks_fastscroller.updateBubbleText(track?.title ?: "")
|
||||
}
|
||||
}
|
||||
|
||||
if (!context.config.wereCoversUpdated) {
|
||||
tracks.filter { it.coverArt.isNotEmpty() }.forEach {
|
||||
activity.tracksDAO.updateCoverArt(it.coverArt, it.id)
|
||||
}
|
||||
context.config.wereCoversUpdated = true
|
||||
}
|
||||
}
|
||||
|
||||
tracks_fastscroller.updatePrimaryColor()
|
||||
|
|
Loading…
Reference in a new issue