From c25e5d54568898c505575a2a298bdc0a93b190d3 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Fri, 6 Dec 2024 17:32:57 -0300 Subject: [PATCH] checkpoint/fix: show missing posts by importing them with old reducer, importFetchedStatuses function --- src/components/pure-status.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/pure-status.tsx b/src/components/pure-status.tsx index ccc9a7ec3..4bb32d190 100644 --- a/src/components/pure-status.tsx +++ b/src/components/pure-status.tsx @@ -6,6 +6,7 @@ import { useCallback, useEffect, useRef, useState } from 'react'; import { useIntl, FormattedMessage, defineMessages } from 'react-intl'; import { Link, useHistory } from 'react-router-dom'; +import { importFetchedStatuses } from 'soapbox/actions/importer/index.ts'; import { openModal } from 'soapbox/actions/modals.ts'; import { unfilterStatus } from 'soapbox/actions/statuses.ts'; import PureEventPreview from 'soapbox/components/pure-event-preview.tsx'; @@ -126,11 +127,16 @@ const PureStatus: React.FC = (props) => { } }, [overlay.current]); + // START: this is a temporary code, it will be removed + useEffect(() => { + dispatch(importFetchedStatuses([status])); + }, []); const getStatus = useCallback(makeGetStatus(), []); const statusImmutable = useAppSelector(state => getStatus(state, { id: status.id })); if (!statusImmutable) { return null; } + // END: this is a temporary code, it will be removed const handleToggleMediaVisibility = (): void => { setShowMedia(!showMedia);