mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Small Performance Improvement
This commit is contained in:
parent
6ed2fabd27
commit
28e8533f65
@ -247,10 +247,9 @@ class PlayerFragment : Fragment() {
|
|||||||
commentsRecView = view.findViewById(R.id.comments_recView)
|
commentsRecView = view.findViewById(R.id.comments_recView)
|
||||||
commentsRecView.layoutManager = LinearLayoutManager(view.context)
|
commentsRecView.layoutManager = LinearLayoutManager(view.context)
|
||||||
|
|
||||||
commentsRecView.setItemViewCacheSize(20);
|
commentsRecView.setItemViewCacheSize(20)
|
||||||
commentsRecView.setDrawingCacheEnabled(true);
|
commentsRecView.setDrawingCacheEnabled(true)
|
||||||
commentsRecView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
commentsRecView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH)
|
||||||
|
|
||||||
|
|
||||||
relatedRecView = view.findViewById(R.id.player_recView)
|
relatedRecView = view.findViewById(R.id.player_recView)
|
||||||
relatedRecView.layoutManager =
|
relatedRecView.layoutManager =
|
||||||
|
@ -28,7 +28,7 @@ class CommentsAdapter(private val comments: MutableList<Comment>): RecyclerView
|
|||||||
holder.v.findViewById<TextView>(R.id.comment_infos).text = comments[position].author.toString() + " • " + comments[position].commentedTime.toString()
|
holder.v.findViewById<TextView>(R.id.comment_infos).text = comments[position].author.toString() + " • " + comments[position].commentedTime.toString()
|
||||||
holder.v.findViewById<TextView>(R.id.comment_text).text = comments[position].commentText.toString()
|
holder.v.findViewById<TextView>(R.id.comment_text).text = comments[position].commentText.toString()
|
||||||
val thumbnailImage = holder.v.findViewById<ImageView>(R.id.commentor_image)
|
val thumbnailImage = holder.v.findViewById<ImageView>(R.id.commentor_image)
|
||||||
Picasso.get().load(comments[position].thumbnail).resize(50,50).centerCrop().into(thumbnailImage)
|
Picasso.get().load(comments[position].thumbnail).fit().centerCrop().into(thumbnailImage)
|
||||||
holder.v.findViewById<TextView>(R.id.likes_textView).text = comments[position].likeCount?.toLong().formatShort()
|
holder.v.findViewById<TextView>(R.id.likes_textView).text = comments[position].likeCount?.toLong().formatShort()
|
||||||
if (comments[position].verified == true) {
|
if (comments[position].verified == true) {
|
||||||
holder.v.findViewById<ImageView>(R.id.verified_imageView).visibility = View.VISIBLE
|
holder.v.findViewById<ImageView>(R.id.verified_imageView).visibility = View.VISIBLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user