2
0

Fix relationship not being fetched to evaluate whether to show a quote post (#36517)

This commit is contained in:
Claire
2025-10-17 15:03:18 +02:00
committed by GitHub
parent 6dad80eb8c
commit 811c1eaf7e

View File

@@ -12,6 +12,7 @@ import type { Status } from 'mastodon/models/status';
import type { RootState } from 'mastodon/store'; import type { RootState } from 'mastodon/store';
import { useAppDispatch, useAppSelector } from 'mastodon/store'; import { useAppDispatch, useAppSelector } from 'mastodon/store';
import { fetchRelationships } from '../actions/accounts';
import { revealAccount } from '../actions/accounts_typed'; import { revealAccount } from '../actions/accounts_typed';
import { fetchStatus } from '../actions/statuses'; import { fetchStatus } from '../actions/statuses';
import { makeGetStatusWithExtraInfo } from '../selectors'; import { makeGetStatusWithExtraInfo } from '../selectors';
@@ -148,6 +149,10 @@ export const QuotedStatus: React.FC<QuotedStatusProps> = ({
} }
}, [shouldFetchQuote, quotedStatusId, parentQuotePostId, dispatch]); }, [shouldFetchQuote, quotedStatusId, parentQuotePostId, dispatch]);
useEffect(() => {
if (accountId && hiddenAccount) dispatch(fetchRelationships([accountId]));
}, [accountId, hiddenAccount, dispatch]);
const isFilteredAndHidden = loadingState === 'filtered'; const isFilteredAndHidden = loadingState === 'filtered';
let quoteError: React.ReactNode = null; let quoteError: React.ReactNode = null;