1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Enable media timeline (#7598)

This commit is contained in:
Yamagishi Kazutoshi 2018-05-26 01:36:46 +09:00 committed by Eugen Rochko
parent 7ea91dcbb3
commit 8182b61518
2 changed files with 22 additions and 26 deletions

View file

@ -8,7 +8,7 @@ import ColumnHeader from '../../components/column_header';
import { expandCommunityTimeline } from '../../actions/timelines'; import { expandCommunityTimeline } from '../../actions/timelines';
import { addColumn, removeColumn, moveColumn, changeColumnParams } from '../../actions/columns'; import { addColumn, removeColumn, moveColumn, changeColumnParams } from '../../actions/columns';
import ColumnSettingsContainer from './containers/column_settings_container'; import ColumnSettingsContainer from './containers/column_settings_container';
// import SectionHeadline from './components/section_headline'; import SectionHeadline from './components/section_headline';
import { connectCommunityStream } from '../../actions/streaming'; import { connectCommunityStream } from '../../actions/streaming';
const messages = defineMessages({ const messages = defineMessages({
@ -100,17 +100,15 @@ export default class CommunityTimeline extends React.PureComponent {
const { intl, hasUnread, columnId, multiColumn, onlyMedia } = this.props; const { intl, hasUnread, columnId, multiColumn, onlyMedia } = this.props;
const pinned = !!columnId; const pinned = !!columnId;
// pending const headline = (
// <SectionHeadline
// const headline = ( timelineId='community'
// <SectionHeadline to='/timelines/public/local'
// timelineId='community' pinned={pinned}
// to='/timelines/public/local' onlyMedia={onlyMedia}
// pinned={pinned} onClick={this.handleHeadlineLinkClick}
// onlyMedia={onlyMedia} />
// onClick={this.handleHeadlineLinkClick} );
// />
// );
return ( return (
<Column ref={this.setRef}> <Column ref={this.setRef}>
@ -128,7 +126,7 @@ export default class CommunityTimeline extends React.PureComponent {
</ColumnHeader> </ColumnHeader>
<StatusListContainer <StatusListContainer
// prepend={headline} prepend={headline}
trackScroll={!pinned} trackScroll={!pinned}
scrollKey={`community_timeline-${columnId}`} scrollKey={`community_timeline-${columnId}`}
timelineId={`community${onlyMedia ? ':media' : ''}`} timelineId={`community${onlyMedia ? ':media' : ''}`}

View file

@ -8,7 +8,7 @@ import ColumnHeader from '../../components/column_header';
import { expandPublicTimeline } from '../../actions/timelines'; import { expandPublicTimeline } from '../../actions/timelines';
import { addColumn, removeColumn, moveColumn, changeColumnParams } from '../../actions/columns'; import { addColumn, removeColumn, moveColumn, changeColumnParams } from '../../actions/columns';
import ColumnSettingsContainer from './containers/column_settings_container'; import ColumnSettingsContainer from './containers/column_settings_container';
// import SectionHeadline from '../community_timeline/components/section_headline'; import SectionHeadline from '../community_timeline/components/section_headline';
import { connectPublicStream } from '../../actions/streaming'; import { connectPublicStream } from '../../actions/streaming';
const messages = defineMessages({ const messages = defineMessages({
@ -100,17 +100,15 @@ export default class PublicTimeline extends React.PureComponent {
const { intl, columnId, hasUnread, multiColumn, onlyMedia } = this.props; const { intl, columnId, hasUnread, multiColumn, onlyMedia } = this.props;
const pinned = !!columnId; const pinned = !!columnId;
// pending const headline = (
// <SectionHeadline
// const headline = ( timelineId='public'
// <SectionHeadline to='/timelines/public'
// timelineId='public' pinned={pinned}
// to='/timelines/public' onlyMedia={onlyMedia}
// pinned={pinned} onClick={this.handleHeadlineLinkClick}
// onlyMedia={onlyMedia} />
// onClick={this.handleHeadlineLinkClick} );
// />
// );
return ( return (
<Column ref={this.setRef}> <Column ref={this.setRef}>
@ -128,7 +126,7 @@ export default class PublicTimeline extends React.PureComponent {
</ColumnHeader> </ColumnHeader>
<StatusListContainer <StatusListContainer
// prepend={headline} prepend={headline}
timelineId={`public${onlyMedia ? ':media' : ''}`} timelineId={`public${onlyMedia ? ':media' : ''}`}
onLoadMore={this.handleLoadMore} onLoadMore={this.handleLoadMore}
trackScroll={!pinned} trackScroll={!pinned}