diff --git a/app/javascript/flavours/glitch/features/firehose/index.jsx b/app/javascript/flavours/glitch/features/firehose/index.jsx index 19bb6d791..9db45a0e4 100644 --- a/app/javascript/flavours/glitch/features/firehose/index.jsx +++ b/app/javascript/flavours/glitch/features/firehose/index.jsx @@ -49,6 +49,12 @@ const ColumnSettings = () => { onChange={onChange} label={} /> + } + /> ); @@ -63,6 +69,8 @@ const Firehose = ({ feedType, multiColumn }) => { const onlyMedia = useAppSelector((state) => state.getIn(['settings', 'firehose', 'onlyMedia'], false)); const hasUnread = useAppSelector((state) => state.getIn(['timelines', `${feedType}${onlyMedia ? ':media' : ''}`, 'unread'], 0) > 0); + const allowLocalOnly = useAppSelector((state) => state.getIn(['settings', 'firehose', 'allowLocalOnly'])); + const handlePin = useCallback( () => { switch(feedType) { @@ -70,14 +78,14 @@ const Firehose = ({ feedType, multiColumn }) => { dispatch(addColumn('COMMUNITY', { other: { onlyMedia } })); break; case 'public': - dispatch(addColumn('PUBLIC', { other: { onlyMedia } })); + dispatch(addColumn('PUBLIC', { other: { onlyMedia, allowLocalOnly } })); break; case 'public:remote': dispatch(addColumn('REMOTE', { other: { onlyMedia, onlyRemote: true } })); break; } }, - [dispatch, onlyMedia, feedType], + [dispatch, onlyMedia, feedType, allowLocalOnly], ); const handleLoadMore = useCallback( @@ -87,7 +95,7 @@ const Firehose = ({ feedType, multiColumn }) => { dispatch(expandCommunityTimeline({ onlyMedia })); break; case 'public': - dispatch(expandPublicTimeline({ maxId, onlyMedia })); + dispatch(expandPublicTimeline({ maxId, onlyMedia, allowLocalOnly })); break; case 'public:remote': dispatch(expandPublicTimeline({ maxId, onlyMedia, onlyRemote: true })); @@ -112,7 +120,7 @@ const Firehose = ({ feedType, multiColumn }) => { case 'public': dispatch(expandPublicTimeline({ onlyMedia })); if (signedIn) { - disconnect = dispatch(connectPublicStream({ onlyMedia })); + disconnect = dispatch(connectPublicStream({ onlyMedia, allowLocalOnly })); } break; case 'public:remote': diff --git a/app/javascript/flavours/glitch/locales/en.json b/app/javascript/flavours/glitch/locales/en.json index 07ca42339..555375053 100644 --- a/app/javascript/flavours/glitch/locales/en.json +++ b/app/javascript/flavours/glitch/locales/en.json @@ -52,6 +52,7 @@ "empty_column.follow_recommendations": "Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.", "endorsed_accounts_editor.endorsed_accounts": "Featured accounts", "favourite_modal.combo": "You can press {combo} to skip this next time", + "firehose.column_settings.allow_local_only": "Show local-only posts in \"All\"", "follow_recommendations.done": "Done", "follow_recommendations.heading": "Follow people you'd like to see posts from! Here are some suggestions.", "follow_recommendations.lead": "Posts from people you follow will show up in chronological order on your home feed. Don't be afraid to make mistakes, you can unfollow people just as easily any time!", diff --git a/app/javascript/flavours/glitch/reducers/settings.js b/app/javascript/flavours/glitch/reducers/settings.js index 0f038670e..fcf72a0b1 100644 --- a/app/javascript/flavours/glitch/reducers/settings.js +++ b/app/javascript/flavours/glitch/reducers/settings.js @@ -86,6 +86,7 @@ const initialState = ImmutableMap({ firehose: ImmutableMap({ onlyMedia: false, + allowLocalOnly: true, }), community: ImmutableMap({