fix: negative count of videos in a playlist

This commit is contained in:
Bnyro 2025-02-03 18:15:41 +01:00
parent 0025782986
commit 6d55c401d0
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ class SearchChannelAdapter : ListAdapter<ContentItem, SearchViewHolder>(SearchCa
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
binding.apply {
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
playlistDescription.text = item.uploaderName
root.setOnClickListener {

View File

@ -171,7 +171,7 @@ class SearchResultsAdapter(
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
binding.apply {
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
playlistDescription.text = item.uploaderName
root.setOnClickListener {