mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Fix the layout of boomarked playlists in the library
This commit is contained in:
parent
56f8fdf84f
commit
c3182edc73
@ -7,7 +7,7 @@ import androidx.appcompat.app.AppCompatActivity
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.github.libretube.R
|
import com.github.libretube.R
|
||||||
import com.github.libretube.databinding.PlaylistBookmarkRowBinding
|
import com.github.libretube.databinding.PlaylistBookmarkRowBinding
|
||||||
import com.github.libretube.databinding.PlaylistRowBinding
|
import com.github.libretube.databinding.PlaylistsRowBinding
|
||||||
import com.github.libretube.db.DatabaseHolder
|
import com.github.libretube.db.DatabaseHolder
|
||||||
import com.github.libretube.db.obj.PlaylistBookmark
|
import com.github.libretube.db.obj.PlaylistBookmark
|
||||||
import com.github.libretube.enums.PlaylistType
|
import com.github.libretube.enums.PlaylistType
|
||||||
@ -28,7 +28,7 @@ class PlaylistBookmarkAdapter(
|
|||||||
PlaylistBookmarkRowBinding.inflate(layoutInflater, parent, false)
|
PlaylistBookmarkRowBinding.inflate(layoutInflater, parent, false)
|
||||||
)
|
)
|
||||||
BookmarkMode.FRAGMENT -> PlaylistBookmarkViewHolder(
|
BookmarkMode.FRAGMENT -> PlaylistBookmarkViewHolder(
|
||||||
PlaylistRowBinding.inflate(layoutInflater, parent, false)
|
PlaylistsRowBinding.inflate(layoutInflater, parent, false)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,7 +64,10 @@ class PlaylistBookmarkAdapter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.playlistBinding?.apply {
|
holder.playlistsBinding?.apply {
|
||||||
|
// hide the count of videos inside the playlist as it's not stored in the database
|
||||||
|
videoCount.visibility = View.GONE
|
||||||
|
|
||||||
var isBookmarked = true
|
var isBookmarked = true
|
||||||
|
|
||||||
ImageHelper.loadImage(bookmark.thumbnailUrl, playlistThumbnail)
|
ImageHelper.loadImage(bookmark.thumbnailUrl, playlistThumbnail)
|
||||||
|
@ -2,17 +2,17 @@ package com.github.libretube.ui.viewholders
|
|||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.github.libretube.databinding.PlaylistBookmarkRowBinding
|
import com.github.libretube.databinding.PlaylistBookmarkRowBinding
|
||||||
import com.github.libretube.databinding.PlaylistRowBinding
|
import com.github.libretube.databinding.PlaylistsRowBinding
|
||||||
|
|
||||||
class PlaylistBookmarkViewHolder : RecyclerView.ViewHolder {
|
class PlaylistBookmarkViewHolder : RecyclerView.ViewHolder {
|
||||||
var playlistBookmarkBinding: PlaylistBookmarkRowBinding? = null
|
var playlistBookmarkBinding: PlaylistBookmarkRowBinding? = null
|
||||||
var playlistBinding: PlaylistRowBinding? = null
|
var playlistsBinding: PlaylistsRowBinding? = null
|
||||||
|
|
||||||
constructor(binding: PlaylistBookmarkRowBinding) : super(binding.root) {
|
constructor(binding: PlaylistBookmarkRowBinding) : super(binding.root) {
|
||||||
playlistBookmarkBinding = binding
|
playlistBookmarkBinding = binding
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(binding: PlaylistRowBinding) : super(binding.root) {
|
constructor(binding: PlaylistsRowBinding) : super(binding.root) {
|
||||||
playlistBinding = binding
|
playlistsBinding = binding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user