Skip to content

Commit

Permalink
Fix showing local only toots in "All" (glitch-soc#2265)
Browse files Browse the repository at this point in the history
* Fix warnings about missing dependency in hooks

Signed-off-by: Plastikmensch <[email protected]>

* Add `allowLocalOnly` to timelineId

Without this local-only toots will never be loaded.

feedType is checked to be public to not show local-only toots in the "Remote" tab.

Signed-off-by: Plastikmensch <[email protected]>

---------

Signed-off-by: Plastikmensch <[email protected]>
  • Loading branch information
Plastikmensch authored Jul 3, 2023
1 parent ed567c9 commit b422b5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/flavours/glitch/features/firehose/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const Firehose = ({ feedType, multiColumn }) => {
break;
}
},
[dispatch, onlyMedia, feedType],
[dispatch, onlyMedia, allowLocalOnly, feedType],
);

const handleHeaderClick = useCallback(() => columnRef.current?.scrollTop(), []);
Expand Down Expand Up @@ -132,7 +132,7 @@ const Firehose = ({ feedType, multiColumn }) => {
}

return () => disconnect?.();
}, [dispatch, signedIn, feedType, onlyMedia]);
}, [dispatch, signedIn, feedType, onlyMedia, allowLocalOnly]);

const prependBanner = feedType === 'community' ? (
<DismissableBanner id='community_timeline'>
Expand Down Expand Up @@ -193,7 +193,7 @@ const Firehose = ({ feedType, multiColumn }) => {

<StatusListContainer
prepend={prependBanner}
timelineId={`${feedType}${onlyMedia ? ':media' : ''}`}
timelineId={`${feedType}${feedType === 'public' && allowLocalOnly ? ':allow_local_only' : ''}${onlyMedia ? ':media' : ''}`}
onLoadMore={handleLoadMore}
trackScroll
scrollKey='firehose'
Expand Down

0 comments on commit b422b5e

Please sign in to comment.