Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment Detail: Fix Delete button not shown or hidden after moderation status update #17463

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ private extension CommentDetailViewController {

commentService.unapproveComment(comment, success: { [weak self] in
self?.showActionableNotice(title: ModerationMessages.pendingSuccess)
self?.refreshData()
}, failure: { [weak self] error in
self?.displayNotice(title: ModerationMessages.pendingFail)
self?.moderationBar?.commentStatus = CommentStatusType.typeForStatus(self?.comment.status)
Expand All @@ -685,6 +686,7 @@ private extension CommentDetailViewController {

commentService.approve(comment, success: { [weak self] in
self?.showActionableNotice(title: ModerationMessages.approveSuccess)
self?.refreshData()
}, failure: { [weak self] error in
self?.displayNotice(title: ModerationMessages.approveFail)
self?.moderationBar?.commentStatus = CommentStatusType.typeForStatus(self?.comment.status)
Expand All @@ -696,6 +698,7 @@ private extension CommentDetailViewController {

commentService.spamComment(comment, success: { [weak self] in
self?.showActionableNotice(title: ModerationMessages.spamSuccess)
self?.refreshData()
}, failure: { [weak self] error in
self?.displayNotice(title: ModerationMessages.spamFail)
self?.moderationBar?.commentStatus = CommentStatusType.typeForStatus(self?.comment.status)
Expand All @@ -707,6 +710,7 @@ private extension CommentDetailViewController {

commentService.trashComment(comment, success: { [weak self] in
self?.showActionableNotice(title: ModerationMessages.trashSuccess)
self?.refreshData()
}, failure: { [weak self] error in
self?.displayNotice(title: ModerationMessages.trashFail)
self?.moderationBar?.commentStatus = CommentStatusType.typeForStatus(self?.comment.status)
Expand Down