mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2025-10-29 11:35:08 +00:00
Hide approve or remove and mark as spam if the post or comment is approved or removed or marked as spam.
This commit is contained in:
parent
43b4816378
commit
4b7ff707d1
@ -44,19 +44,28 @@ class CommentModerationActionBottomSheetFragment : LandscapeExpandedRoundedBotto
|
||||
)
|
||||
|
||||
comment?.let { comment ->
|
||||
binding.approveTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).approveComment(comment, position)
|
||||
dismiss()
|
||||
if (comment.isApproved) {
|
||||
binding.approveTextViewCommentModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
} else {
|
||||
binding.approveTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).approveComment(comment, position)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
binding.removeTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).removeComment(comment, position, false)
|
||||
dismiss()
|
||||
}
|
||||
if (comment.isRemoved) {
|
||||
binding.removeTextViewCommentModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
binding.spamTextViewCommentModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
} else {
|
||||
binding.removeTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).removeComment(comment, position, false)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
binding.spamTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).removeComment(comment, position, true)
|
||||
dismiss()
|
||||
binding.spamTextViewCommentModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as CommentModerationActionHandler).removeComment(comment, position, true)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
activity?.let {
|
||||
|
||||
@ -40,19 +40,28 @@ class PostModerationActionBottomSheetFragment : LandscapeExpandedRoundedBottomSh
|
||||
val binding: FragmentModerationActionBottomSheetBinding = FragmentModerationActionBottomSheetBinding.inflate(inflater, container, false)
|
||||
post?.let { post ->
|
||||
if (parentFragment is PostModerationActionHandler) {
|
||||
binding.approveTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).approvePost(post, position)
|
||||
dismiss()
|
||||
if (post.isApproved) {
|
||||
binding.approveTextViewModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
} else {
|
||||
binding.approveTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).approvePost(post, position)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
binding.removeTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).removePost(post, position, false)
|
||||
dismiss()
|
||||
}
|
||||
if (post.isRemoved) {
|
||||
binding.removeTextViewModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
binding.spamTextViewModerationActionBottomSheetFragment.visibility = View.GONE
|
||||
} else {
|
||||
binding.removeTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).removePost(post, position, false)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
binding.spamTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).removePost(post, position, true)
|
||||
dismiss()
|
||||
binding.spamTextViewModerationActionBottomSheetFragment.setOnClickListener {
|
||||
(parentFragment as PostModerationActionHandler).removePost(post, position, true)
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
activity?.let {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user