mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
[Glitch] Fix WebUI fetching deleted quote in an endless loop
Port bd6d1f0e3f to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -87,12 +87,13 @@ export const QuotedStatus: React.FC<{
|
||||
const status = useAppSelector((state) =>
|
||||
quotedStatusId ? state.statuses.get(quotedStatusId) : undefined,
|
||||
);
|
||||
const isQuoteLoaded = !!status && !status.get('isLoading');
|
||||
|
||||
useEffect(() => {
|
||||
if (!status && quotedStatusId) {
|
||||
if (!isQuoteLoaded && quotedStatusId) {
|
||||
dispatch(fetchStatus(quotedStatusId));
|
||||
}
|
||||
}, [status, quotedStatusId, dispatch]);
|
||||
}, [isQuoteLoaded, quotedStatusId, dispatch]);
|
||||
|
||||
// In order to find out whether the quoted post should be completely hidden
|
||||
// due to a matching filter, we run it through the selector used by `status_container`.
|
||||
|
||||
Reference in New Issue
Block a user