Fix #3905: Unable to hide Mod Queue posts that were hidden in a separate tab.

Don't show "You have already hidden this post" and "Post is already
active" errors when disapproving a post. Just hide the post anyway
regardless of whether we literally created a post disapproval record.
This commit is contained in:
evazion
2020-04-30 20:18:44 -05:00
parent 8299c969fb
commit 659c31f5cd

View File

@@ -1,10 +1,6 @@
<% if @post_disapproval.errors.any? %>
Danbooru.error("Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
<% else %>
if ($("#c-posts #a-show").length) {
location.reload();
} else if ($("#c-modqueue").length) {
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
Danbooru.notice("Post was hidden");
}
<% end %>
if ($("#c-posts #a-show").length) {
location.reload();
} else if ($("#c-modqueue").length) {
$("#c-modqueue #post-<%= @post_disapproval.post.id %>").hide();
Danbooru.notice("Post was hidden");
}