From c0a1b671c85c2fb9e8035f56a686c71f4c93ec43 Mon Sep 17 00:00:00 2001 From: plebeius Date: Sat, 8 Nov 2025 17:00:28 +0100 Subject: [PATCH] feat(reply modal): add alert when attempting multiple quotes --- src/stores/use-reply-modal-store.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/stores/use-reply-modal-store.ts b/src/stores/use-reply-modal-store.ts index 612614dc..81efb84b 100644 --- a/src/stores/use-reply-modal-store.ts +++ b/src/stores/use-reply-modal-store.ts @@ -28,6 +28,12 @@ const useReplyModalStore = create((set, get) => ({ }, openReplyModal: (parentCid, postCid, subplebbitAddress) => { + // Don't update if already open with different parent + if (get().activeCid && get().activeCid !== parentCid) { + window.alert('Multiple quotes are not possible on 5chan for the time being, because of a protocol limitation. Please reply to one post at a time.'); + return; + } + // Get selected text const text = document.getSelection()?.toString(); if (text) { @@ -38,11 +44,6 @@ const useReplyModalStore = create((set, get) => ({ const isMobile = window.innerWidth <= 768; // Simple check, adjust as needed const scrollY = isMobile ? window.scrollY : 0; - // Don't update if already open with different parent - if (get().activeCid && get().activeCid !== parentCid) { - return; - } - set({ activeCid: parentCid, threadCid: postCid,