Fix relationship not being fetched to evaluate whether to show a quote post (#36517)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user