mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 16:00:31 +05:30
Merge pull request #7067 from Bnyro/master
fix: negative count of videos in a playlist
This commit is contained in:
commit
a1cb16b07a
@ -151,7 +151,7 @@ class SearchChannelAdapter : ListAdapter<ContentItem, SearchViewHolder>(
|
|||||||
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 {
|
||||||
|
@ -176,7 +176,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