0
0
Fork 0

Various improvements to the report UI (#7342)

* Also display replies in report modal

* Allow report modal to be up to 80% of viewport height

* Use narrow no-break space where needed in the French translation
This commit is contained in:
ThibG 2018-05-06 20:38:17 +02:00 committed by Eugen Rochko
parent e571de29bf
commit 5c7bed6bbc
3 changed files with 16 additions and 16 deletions

View file

@ -30,7 +30,7 @@ const makeMapStateToProps = () => {
account: getAccount(state, accountId),
comment: state.getIn(['reports', 'new', 'comment']),
forward: state.getIn(['reports', 'new', 'forward']),
statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),
statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),
};
};
@ -64,12 +64,12 @@ export default class ReportModal extends ImmutablePureComponent {
}
componentDidMount () {
this.props.dispatch(expandAccountTimeline(this.props.account.get('id')));
this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));
}
componentWillReceiveProps (nextProps) {
if (this.props.account !== nextProps.account && nextProps.account) {
this.props.dispatch(expandAccountTimeline(nextProps.account.get('id')));
this.props.dispatch(expandAccountTimeline(nextProps.account.get('id'), { withReplies: true }));
}
}