Skip to content
Snippets Groups Projects
Commit 98d797a2 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix playlist tracks number display

Use correct format and prevent I/O from main thread
parent 3c1c867c
No related branches found
No related tags found
No related merge requests found
Pipeline #11058 passed with stage
in 4 minutes and 10 seconds
......@@ -697,7 +697,7 @@
<string name="popup_force_legacy_title">Use custom Picture-in-Picture popup</string>
<string name="popup_force_legacy_summary">Use custom Picture-in-Picture resizable popup</string>
<string name="device_default">Device default</string>
<string name="track_number">%s tracks</string>
<string name="track_number">%d tracks</string>
<string name="jump_to">Jump to</string>
<string name="show_video_thumbnails_summary">Show video thumbnails in lists</string>
<string name="show_video_thumbnails">Video thumbnails</string>
......
......@@ -177,7 +177,7 @@ fun asyncTextItem(view: TextView, item: MediaLibraryItem?) {
view.visibility = View.GONE
return
}
val text = if (item.itemType == MediaLibraryItem.TYPE_PLAYLIST) view.context.getString(org.videolan.vlc.R.string.track_number, item.tracks.size.toString()) else item.description
val text = if (item.itemType == MediaLibraryItem.TYPE_PLAYLIST) view.context.getString(R.string.track_number, item.tracksCount) else item.description
if (text.isNullOrEmpty()) {
view.visibility = View.GONE
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment