mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 20:51:36 +01:00
Fetch relationships when opening report modal
Relationship with the reported account affect which actions are proposed in the “thanks” part. Upstream fetches relationships when opening dropdown menus, but we don't.
This commit is contained in:
parent
470c0a8002
commit
aafe91259a
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ import { connect } from 'react-redux';
|
||||||
import { submitReport } from 'flavours/glitch/actions/reports';
|
import { submitReport } from 'flavours/glitch/actions/reports';
|
||||||
import { expandAccountTimeline } from 'flavours/glitch/actions/timelines';
|
import { expandAccountTimeline } from 'flavours/glitch/actions/timelines';
|
||||||
import { fetchRules } from 'flavours/glitch/actions/rules';
|
import { fetchRules } from 'flavours/glitch/actions/rules';
|
||||||
|
import { fetchRelationships } from 'flavours/glitch/actions/accounts';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { makeGetAccount } from 'flavours/glitch/selectors';
|
import { makeGetAccount } from 'flavours/glitch/selectors';
|
||||||
|
@ -116,6 +117,7 @@ class ReportModal extends ImmutablePureComponent {
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
const { dispatch, accountId } = this.props;
|
const { dispatch, accountId } = this.props;
|
||||||
|
|
||||||
|
dispatch(fetchRelationships([accountId]));
|
||||||
dispatch(expandAccountTimeline(accountId, { withReplies: true }));
|
dispatch(expandAccountTimeline(accountId, { withReplies: true }));
|
||||||
dispatch(fetchRules());
|
dispatch(fetchRules());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue