diff --git a/app/javascript/mastodon/features/firehose/index.jsx b/app/javascript/mastodon/features/firehose/index.jsx index 795286898a..9ba4fd5b2b 100644 --- a/app/javascript/mastodon/features/firehose/index.jsx +++ b/app/javascript/mastodon/features/firehose/index.jsx @@ -21,7 +21,6 @@ import StatusListContainer from '../ui/containers/status_list_container'; const messages = defineMessages({ title: { id: 'column.firehose', defaultMessage: 'Live feeds' }, - titleDefault: { id: 'column.community', defaultMessage: 'Local timeline' }, }); // TODO: use a proper React context later on @@ -55,7 +54,7 @@ const ColumnSettings = () => { ); }; -const Firehose = ({ feedType, defaultColumn, multiColumn }) => { +const Firehose = ({ feedType, multiColumn }) => { const dispatch = useAppDispatch(); const intl = useIntl(); const { signedIn } = useIdentity(); @@ -157,31 +156,12 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => { /> ); - const headerIcon = defaultColumn ? 'users' : 'globe'; - const headerTitle = defaultColumn ? messages.titleDefault : messages.title; - - const sectionHeadline = defaultColumn || ( - <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'> - <FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' /> - </NavLink> - </div> - ); - return ( <Column bindToDocument={!multiColumn} ref={columnRef} label={intl.formatMessage(messages.title)}> <ColumnHeader - icon={headerIcon} + icon='globe' active={hasUnread} - title={intl.formatMessage(headerTitle)} + title={intl.formatMessage(messages.title)} onPin={handlePin} onClick={handleHeaderClick} multiColumn={multiColumn} @@ -190,7 +170,19 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => { </ColumnHeader> <div className='scrollable scrollable--flex'> - {sectionHeadline} + <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'> + <FormattedMessage tagName='div' id='firehose.all' defaultMessage='All' /> + </NavLink> + </div> <StatusListContainer prepend={prependBanner} @@ -212,7 +204,6 @@ const Firehose = ({ feedType, defaultColumn, multiColumn }) => { } Firehose.propTypes = { - defaultColumn: PropTypes.bool, multiColumn: PropTypes.bool, feedType: PropTypes.string, }; diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx index c1f24a222d..463234f92e 100644 --- a/app/javascript/mastodon/features/ui/index.jsx +++ b/app/javascript/mastodon/features/ui/index.jsx @@ -66,6 +66,7 @@ import { Onboarding, About, PrivacyPolicy, + CommunityTimeline, } from './util/async-components'; import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers'; @@ -197,7 +198,7 @@ class SwitchingColumnsArea extends PureComponent { <WrappedRoute path='/public' exact component={Firehose} componentParams={{ feedType: 'public' }} content={children} /> <WrappedRoute path='/public/local' exact component={Firehose} componentParams={{ feedType: 'community' }} content={children} /> <WrappedRoute path='/public/remote' exact component={Firehose} componentParams={{ feedType: 'public:remote' }} content={children} /> - <WrappedRoute path='/public/local/fixed' exact component={Firehose} componentParams={{ feedType: 'community', defaultColumn: true }} content={children} /> + <WrappedRoute path='/public/local/fixed' exact component={CommunityTimeline} content={children} /> <WrappedRoute path={['/conversations', '/timelines/direct']} component={DirectTimeline} content={children} /> <WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} /> <WrappedRoute path='/lists/:id' component={ListTimeline} content={children} />