Refactor initial state: reduce_motion and auto_play_gif (#5501)
This commit is contained in:
parent
e4080772b5
commit
3de22a82bf
13 changed files with 27 additions and 52 deletions
|
@ -19,7 +19,6 @@ const mapStateToProps = (state, props) => ({
|
|||
medias: getAccountGallery(state, props.params.accountId),
|
||||
isLoading: state.getIn(['timelines', `account:${props.params.accountId}:media`, 'isLoading']),
|
||||
hasMore: !!state.getIn(['timelines', `account:${props.params.accountId}:media`, 'next']),
|
||||
autoPlayGif: state.getIn(['meta', 'auto_play_gif']),
|
||||
});
|
||||
|
||||
@connect(mapStateToProps)
|
||||
|
@ -31,7 +30,6 @@ export default class AccountGallery extends ImmutablePureComponent {
|
|||
medias: ImmutablePropTypes.list.isRequired,
|
||||
isLoading: PropTypes.bool,
|
||||
hasMore: PropTypes.bool,
|
||||
autoPlayGif: PropTypes.bool,
|
||||
};
|
||||
|
||||
componentDidMount () {
|
||||
|
@ -67,7 +65,7 @@ export default class AccountGallery extends ImmutablePureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { medias, autoPlayGif, isLoading, hasMore } = this.props;
|
||||
const { medias, isLoading, hasMore } = this.props;
|
||||
|
||||
let loadMore = null;
|
||||
|
||||
|
@ -100,7 +98,6 @@ export default class AccountGallery extends ImmutablePureComponent {
|
|||
<MediaItem
|
||||
key={media.get('id')}
|
||||
media={media}
|
||||
autoPlayGif={autoPlayGif}
|
||||
/>
|
||||
)}
|
||||
{loadMore}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue