StatusListContainer --> Timeline
This commit is contained in:
parent
edf366858a
commit
2aa4b41528
10 changed files with 21 additions and 21 deletions
|
@ -9,7 +9,7 @@ import { expandCommunityTimeline } from 'soapbox/actions/timelines';
|
|||
import SubNavigation from 'soapbox/components/sub_navigation';
|
||||
import { Column } from 'soapbox/components/ui';
|
||||
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
import ColumnSettings from './containers/column_settings_container';
|
||||
|
||||
|
@ -81,7 +81,7 @@ class CommunityTimeline extends React.PureComponent {
|
|||
return (
|
||||
<Column label={intl.formatMessage(messages.title)} transparent>
|
||||
<SubNavigation message={intl.formatMessage(messages.title)} settings={ColumnSettings} />
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey={`${timelineId}_timeline`}
|
||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
|
|
@ -9,7 +9,7 @@ import ColumnHeader from 'soapbox/components/column_header';
|
|||
import { Column } from 'soapbox/components/ui';
|
||||
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
||||
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.direct', defaultMessage: 'Direct messages' },
|
||||
|
@ -52,7 +52,7 @@ const DirectTimeline = () => {
|
|||
onSelected={handleSuggestion}
|
||||
/>
|
||||
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey='direct_timeline'
|
||||
timelineId='direct'
|
||||
onLoadMore={handleLoadMore}
|
||||
|
|
|
@ -12,7 +12,7 @@ import { connectGroupStream } from '../../../actions/streaming';
|
|||
import { expandGroupTimeline } from '../../../actions/timelines';
|
||||
import Avatar from '../../../components/avatar';
|
||||
import MissingIndicator from '../../../components/missing_indicator';
|
||||
import StatusListContainer from '../../ui/containers/status_list_container';
|
||||
import Timeline from '../../ui/components/timeline';
|
||||
|
||||
const mapStateToProps = (state, props) => {
|
||||
const me = state.get('me');
|
||||
|
@ -90,7 +90,7 @@ class GroupTimeline extends React.PureComponent {
|
|||
)}
|
||||
|
||||
<div className='group__feed'>
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
alwaysPrepend
|
||||
scrollKey={`group_timeline-${columnId}`}
|
||||
timelineId={`group:${id}`}
|
||||
|
|
|
@ -8,7 +8,7 @@ import { connectHashtagStream } from '../../actions/streaming';
|
|||
import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
|
||||
import ColumnHeader from '../../components/column_header';
|
||||
import { Column } from '../../components/ui';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
|
||||
|
@ -114,7 +114,7 @@ class HashtagTimeline extends React.PureComponent {
|
|||
return (
|
||||
<Column label={`#${id}`} transparent>
|
||||
<ColumnHeader active={hasUnread} title={this.title()} />
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey='hashtag_timeline'
|
||||
timelineId={`hashtag:${id}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
|
|
@ -10,7 +10,7 @@ import { getFeatures } from 'soapbox/utils/features';
|
|||
|
||||
import { expandHomeTimeline } from '../../actions/timelines';
|
||||
import { Column } from '../../components/ui';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
function FollowRecommendationsContainer() {
|
||||
return import(/* webpackChunkName: "features/follow_recommendations" */'soapbox/features/follow_recommendations/components/follow_recommendations_container');
|
||||
|
@ -114,7 +114,7 @@ class HomeTimeline extends React.PureComponent {
|
|||
{Component => <Component onDone={this.handleDone} />}
|
||||
</BundleContainer>
|
||||
) : (
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey='home_timeline'
|
||||
onLoadMore={this.handleLoadMore}
|
||||
onRefresh={this.handleRefresh}
|
||||
|
|
|
@ -12,7 +12,7 @@ import { Button, Spinner } from 'soapbox/components/ui';
|
|||
import Column from 'soapbox/features/ui/components/column';
|
||||
import { useAppSelector } from 'soapbox/hooks';
|
||||
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
// const messages = defineMessages({
|
||||
// deleteHeading: { id: 'confirmations.delete_list.heading', defaultMessage: 'Delete list' },
|
||||
|
@ -110,7 +110,7 @@ const ListTimeline: React.FC = () => {
|
|||
</div>
|
||||
</HomeColumnHeader> */}
|
||||
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey='list_timeline'
|
||||
timelineId={`list:${id}`}
|
||||
onLoadMore={handleLoadMore}
|
||||
|
|
|
@ -12,7 +12,7 @@ import { Column } from 'soapbox/components/ui';
|
|||
import Accordion from 'soapbox/features/ui/components/accordion';
|
||||
|
||||
import PinnedHostsPicker from '../remote_timeline/components/pinned_hosts_picker';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
import ColumnSettings from './containers/column_settings_container';
|
||||
|
||||
|
@ -130,7 +130,7 @@ class CommunityTimeline extends React.PureComponent {
|
|||
/>
|
||||
</Accordion>
|
||||
</div>}
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey={`${timelineId}_timeline`}
|
||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||
onLoadMore={this.handleLoadMore}
|
||||
|
|
|
@ -9,7 +9,7 @@ import { HStack, Text } from 'soapbox/components/ui';
|
|||
import Column from 'soapbox/features/ui/components/column';
|
||||
import { useAppDispatch, useSettings } from 'soapbox/hooks';
|
||||
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
import PinnedHostsPicker from './components/pinned_hosts_picker';
|
||||
|
||||
|
@ -77,7 +77,7 @@ const RemoteTimeline: React.FC<IRemoteTimeline> = ({ params }) => {
|
|||
/>
|
||||
</Text>
|
||||
</HStack>}
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey={`${timelineId}_${instance}_timeline`}
|
||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}:${instance}`}
|
||||
onLoadMore={handleLoadMore}
|
||||
|
|
|
@ -7,7 +7,7 @@ import { expandTimelineSuccess } from 'soapbox/actions/timelines';
|
|||
import SubNavigation from 'soapbox/components/sub_navigation';
|
||||
|
||||
import { Column } from '../../components/ui';
|
||||
import StatusListContainer from '../ui/containers/status_list_container';
|
||||
import Timeline from '../ui/components/timeline';
|
||||
|
||||
const messages = defineMessages({
|
||||
title: { id: 'column.test', defaultMessage: 'Test timeline' },
|
||||
|
@ -40,7 +40,7 @@ const TestTimeline: React.FC = () => {
|
|||
return (
|
||||
<Column label={intl.formatMessage(messages.title)} transparent>
|
||||
<SubNavigation message={intl.formatMessage(messages.title)} />
|
||||
<StatusListContainer
|
||||
<Timeline
|
||||
scrollKey={`${timelineId}_timeline`}
|
||||
timelineId={`${timelineId}${onlyMedia ? ':media' : ''}`}
|
||||
emptyMessage={<FormattedMessage id='empty_column.test' defaultMessage='The test timeline is empty.' />}
|
||||
|
|
|
@ -14,11 +14,11 @@ const messages = defineMessages({
|
|||
queue: { id: 'status_list.queue_label', defaultMessage: 'Click to see {count} new {count, plural, one {post} other {posts}}' },
|
||||
});
|
||||
|
||||
interface IStatusListContainer extends Omit<IStatusList, 'statusIds' | 'isLoading' | 'hasMore'> {
|
||||
interface ITimeline extends Omit<IStatusList, 'statusIds' | 'isLoading' | 'hasMore'> {
|
||||
timelineId: string,
|
||||
}
|
||||
|
||||
const StatusListContainer: React.FC<IStatusListContainer> = ({
|
||||
const Timeline: React.FC<ITimeline> = ({
|
||||
timelineId,
|
||||
onLoadMore,
|
||||
...rest
|
||||
|
@ -68,4 +68,4 @@ const StatusListContainer: React.FC<IStatusListContainer> = ({
|
|||
);
|
||||
};
|
||||
|
||||
export default StatusListContainer;
|
||||
export default Timeline;
|
Loading…
Reference in a new issue