From 99596d3a54a81fd3439731951854681d2991df25 Mon Sep 17 00:00:00 2001 From: plebeius Date: Thu, 8 Jan 2026 16:46:02 +0100 Subject: [PATCH] fix(mod queue): items shouldn't disappear from feed unless api removes them --- src/views/mod-queue/mod-queue.module.css | 10 ++++++++++ src/views/mod-queue/mod-queue.tsx | 10 ++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/mod-queue/mod-queue.module.css b/src/views/mod-queue/mod-queue.module.css index 7357b0a1..8d003dd9 100644 --- a/src/views/mod-queue/mod-queue.module.css +++ b/src/views/mod-queue/mod-queue.module.css @@ -166,6 +166,11 @@ color: var(--mod-queue-button-text-color-hover); text-decoration: var(--mod-queue-button-text-decoration); } + + .button:disabled { + opacity: 0.5; + cursor: not-allowed; + } } .approve { @@ -270,6 +275,11 @@ background: var(--button-background-color-mobile); } + .button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + .header { flex-direction: column; align-items: flex-start; diff --git a/src/views/mod-queue/mod-queue.tsx b/src/views/mod-queue/mod-queue.tsx index 9225123c..12a5808c 100644 --- a/src/views/mod-queue/mod-queue.tsx +++ b/src/views/mod-queue/mod-queue.tsx @@ -53,6 +53,7 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) => await approve(); } catch (e) { console.error(e); + } finally { setIsModerating(false); } }; @@ -63,14 +64,11 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) => await reject(); } catch (e) { console.error(e); + } finally { setIsModerating(false); } }; - if (isModerating) { - return null; // Or show a loading state / fade out - } - const excerpt = title || content || (getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link) ? t('image') : t('no_content')); const postUrl = `/${boardPath}/thread/${threadCid || cid}`; @@ -88,10 +86,10 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) =>
{formatDistanceToNow(timestamp * 1000, { addSuffix: false })}
- -