From d1ab8c7cb666b12d95a9e9e00688e051d0b2266a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sat, 1 Oct 2022 11:41:50 +0200 Subject: [PATCH] fix edit action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/status-action-bar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/status-action-bar.tsx b/app/soapbox/components/status-action-bar.tsx index 546d162a1..642807dad 100644 --- a/app/soapbox/components/status-action-bar.tsx +++ b/app/soapbox/components/status-action-bar.tsx @@ -8,6 +8,7 @@ import { blockAccount } from 'soapbox/actions/accounts'; import { showAlertForError } from 'soapbox/actions/alerts'; import { launchChat } from 'soapbox/actions/chats'; import { directCompose, mentionCompose, quoteCompose, replyCompose } from 'soapbox/actions/compose'; +import { editEvent } from 'soapbox/actions/events'; import { toggleBookmark, toggleFavourite, togglePin, toggleReblog } from 'soapbox/actions/interactions'; import { openModal } from 'soapbox/actions/modals'; import { deleteStatusModal, toggleStatusSensitivityModal } from 'soapbox/actions/moderation'; @@ -209,7 +210,8 @@ const StatusActionBar: React.FC = ({ }; const handleEditClick: React.EventHandler = () => { - dispatch(editStatus(status.id)); + if (status.event) dispatch(editEvent(status.id)); + else dispatch(editStatus(status.id)); }; const handlePinClick: React.EventHandler = (e) => {