mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
fix: negative count of videos in a playlist
This commit is contained in:
parent
0025782986
commit
6d55c401d0
@ -146,7 +146,7 @@ class SearchChannelAdapter : ListAdapter<ContentItem, SearchViewHolder>(SearchCa
|
|||||||
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
|
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
|
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
|
||||||
if (item.videos != -1L) videoCount.text = item.videos.toString()
|
if (item.videos >= 0) videoCount.text = item.videos.toString()
|
||||||
playlistTitle.text = item.name
|
playlistTitle.text = item.name
|
||||||
playlistDescription.text = item.uploaderName
|
playlistDescription.text = item.uploaderName
|
||||||
root.setOnClickListener {
|
root.setOnClickListener {
|
||||||
|
@ -171,7 +171,7 @@ class SearchResultsAdapter(
|
|||||||
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
|
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
|
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
|
||||||
if (item.videos != -1L) videoCount.text = item.videos.toString()
|
if (item.videos >= 0) videoCount.text = item.videos.toString()
|
||||||
playlistTitle.text = item.name
|
playlistTitle.text = item.name
|
||||||
playlistDescription.text = item.uploaderName
|
playlistDescription.text = item.uploaderName
|
||||||
root.setOnClickListener {
|
root.setOnClickListener {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user