Split timeline_preview setting into more granular settings (#36338)

This commit is contained in:
Claire authored and GitHub committed 2025-10-06 08:34:05 +00:00
1 parent 62f91eddf4
commit 2d2c525097
88 files changed
+156 -173

No files matched your search

@@ -13,7 +13,7 @@ import { changeSetting } from 'mastodon/actions/settings';
import { connectPublicStream, connectCommunityStream } from 'mastodon/actions/streaming';
import { expandPublicTimeline, expandCommunityTimeline } from 'mastodon/actions/timelines';
import { DismissableBanner } from 'mastodon/components/dismissable_banner';
import { domain } from 'mastodon/initial_state';
import { localLiveFeedAccess, remoteLiveFeedAccess, me, domain } from 'mastodon/initial_state';
import { useAppDispatch, useAppSelector } from 'mastodon/store';
import Column from '../../components/column';
@@ -165,19 +165,21 @@ const Firehose = ({ feedType, multiColumn }) => {
<ColumnSettings />
</ColumnHeader>
<div className='account__section-headline'>
<NavLink exact to='/public/local'>
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
</NavLink>
{(signedIn || (localLiveFeedAccess === 'public' && remoteLiveFeedAccess === 'public')) && (
<div className='account__section-headline'>
<NavLink exact to='/public/local'>
<FormattedMessage tagName='div' id='firehose.local' defaultMessage='This server' />
</NavLink>
<NavLink exact to='/public/remote'>
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
</NavLink>
<NavLink exact to='/public/remote'>
<FormattedMessage tagName='div' id='firehose.remote' defaultMessage='Other servers' />
</NavLink>
<NavLink exact to='/public'>
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
</NavLink>
</div>
<NavLink exact to='/public'>
<FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' />
</NavLink>
</div>
)}
<StatusListContainer
prepend={prependBanner}
@@ -35,7 +35,12 @@ import { Search } from 'mastodon/features/compose/components/search';
import { ColumnLink } from 'mastodon/features/ui/components/column_link';
import { useBreakpoint } from 'mastodon/features/ui/hooks/useBreakpoint';
import { useIdentity } from 'mastodon/identity_context';
import { timelinePreview, trendsEnabled, me } from 'mastodon/initial_state';
import {
localLiveFeedAccess,
remoteLiveFeedAccess,
trendsEnabled,
me,
} from 'mastodon/initial_state';
import { transientSingleColumn } from 'mastodon/is_mobile';
import { selectUnreadNotificationGroupsCount } from 'mastodon/selectors/notifications';
import { useAppSelector, useAppDispatch } from 'mastodon/store';
@@ -257,10 +262,16 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({
/>
)}
{(signedIn || timelinePreview) && (
{(signedIn ||
localLiveFeedAccess === 'public' ||
remoteLiveFeedAccess === 'public') && (
<ColumnLink
transparent
to='/public/local'
to={
signedIn || localLiveFeedAccess === 'public'
? '/public/local'
: '/public/remote'
}
icon='globe'
iconComponent={PublicIcon}
isActive={isFirehoseActive}