[Glitch] Fix relationship not being fetched to evaluate whether to show a quote post
Port 811c1eaf7e8978d93f24669e55b173052c01fb9f to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
460222e8e1
commit
5123f8aa94
@ -12,6 +12,7 @@ import type { Status } from 'flavours/glitch/models/status';
|
|||||||
import type { RootState } from 'flavours/glitch/store';
|
import type { RootState } from 'flavours/glitch/store';
|
||||||
import { useAppDispatch, useAppSelector } from 'flavours/glitch/store';
|
import { useAppDispatch, useAppSelector } from 'flavours/glitch/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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user