feat : qol things

This commit is contained in:
aayush262 2024-05-22 00:20:59 +05:30
parent 039e3d63fe
commit 48ccb2c581
9 changed files with 98 additions and 110 deletions

View file

@ -14,6 +14,7 @@ import ani.dantotsu.copyToClipboard
import ani.dantotsu.databinding.ItemCommentsBinding
import ani.dantotsu.getAppString
import ani.dantotsu.loadImage
import ani.dantotsu.openImage
import ani.dantotsu.others.ImageViewDialog
import ani.dantotsu.profile.ProfileActivity
import ani.dantotsu.setAnimation
@ -251,13 +252,10 @@ class CommentItem(
}
}
commentTotalVotes.text = (comment.upvotes - comment.downvotes).toString()
commentUserAvatar.setOnLongClickListener {
ImageViewDialog.newInstance(
commentsFragment.activity,
commentsFragment.activity.getString(R.string.avatar, comment.username),
comment.profilePictureUrl
)
}
commentUserAvatar.openImage(
commentsFragment.activity.getString(R.string.avatar, comment.username),
comment.profilePictureUrl ?: ""
)
comment.profilePictureUrl?.let { commentUserAvatar.loadImage(it) }
commentUserName.text = comment.username
val userColor = "[${levelColor.second}]"