feat(comments): UI tweaks
fix(comments): top padding fix: removed self report feat: better colors in color picker
This commit is contained in:
parent
efe5f546a2
commit
2f7c6e734e
8 changed files with 188 additions and 193 deletions
|
@ -59,6 +59,7 @@ class CommentItem(val comment: Comment,
|
|||
markwon.setParsedMarkdown(viewBinding.commentText, viewBinding.commentText.setSpoilerText(spanned, markwon))
|
||||
viewBinding.commentDelete.visibility = if (isUserComment || CommentsAPI.isAdmin || CommentsAPI.isMod) View.VISIBLE else View.GONE
|
||||
viewBinding.commentBanUser.visibility = if ((CommentsAPI.isAdmin || CommentsAPI.isMod) && !isUserComment) View.VISIBLE else View.GONE
|
||||
viewBinding.commentReport.visibility = if (!isUserComment) View.VISIBLE else View.GONE
|
||||
viewBinding.commentEdit.visibility = if (isUserComment) View.VISIBLE else View.GONE
|
||||
if (comment.tag == null) {
|
||||
viewBinding.commentUserTagLayout.visibility = View.GONE
|
||||
|
@ -189,10 +190,9 @@ class CommentItem(val comment: Comment,
|
|||
comment.profilePictureUrl?.let { viewBinding.commentUserAvatar.loadImage(it) }
|
||||
viewBinding.commentUserName.text = comment.username
|
||||
val levelColor = getAvatarColor(comment.totalVotes, backgroundColor)
|
||||
viewBinding.commentUserName.setTextColor(levelColor.first)
|
||||
viewBinding.commentUserLevel.text = "Lv. ${levelColor.second}"
|
||||
viewBinding.commentUserLevel.text = "[${levelColor.second}]"
|
||||
viewBinding.commentUserLevel.setTextColor(levelColor.first)
|
||||
viewBinding.commentUserTime.text = "● ${formatTimestamp(comment.timestamp)}"
|
||||
viewBinding.commentUserTime.text = formatTimestamp(comment.timestamp)
|
||||
}
|
||||
|
||||
override fun getLayout(): Int {
|
||||
|
|
|
@ -159,7 +159,7 @@ class CommentsFragment : Fragment() {
|
|||
}
|
||||
|
||||
binding.commentFilter.setOnClickListener {
|
||||
val alertDialog = android.app.AlertDialog.Builder(activity, R.style.MyPopup)
|
||||
val alertDialog = AlertDialog.Builder(activity, R.style.MyPopup)
|
||||
.setTitle("Enter a chapter/episode number tag")
|
||||
.setView(R.layout.dialog_edittext)
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
|
|
|
@ -225,7 +225,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
|||
val tag = "colorPicker"
|
||||
CustomColorDialog().title("Custom Theme")
|
||||
.colorPreset(originalColor)
|
||||
.colors(this, SimpleColorDialog.BEIGE_COLOR_PALLET)
|
||||
.colors(this, SimpleColorDialog.MATERIAL_COLOR_PALLET)
|
||||
.allowCustom(true)
|
||||
.showOutline(0x46000000)
|
||||
.gridNumColumn(5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue