diff --git a/app/assets/javascripts/components/features/report/components/status_check_box.jsx b/app/assets/javascripts/components/features/report/components/status_check_box.jsx index df4a3145751dd180464f9e229ed90c584d34a38d..6d976582be7d92da89934c532a010c8ef3648d0b 100644 --- a/app/assets/javascripts/components/features/report/components/status_check_box.jsx +++ b/app/assets/javascripts/components/features/report/components/status_check_box.jsx @@ -18,6 +18,10 @@ const StatusCheckBox = React.createClass({ const { status, checked, onToggle, disabled } = this.props; const content = { __html: emojify(status.get('content')) }; + if (status.get('reblog')) { + return null; + } + return ( <div className='status-check-box' style={{ display: 'flex' }}> <div diff --git a/app/assets/javascripts/components/features/report/index.jsx b/app/assets/javascripts/components/features/report/index.jsx index eb8d28fe89b7a5c72c139516cbd6b49cbc70a3fa..3177d28b1d09844fd11a39a8e7221677a7c582ae 100644 --- a/app/assets/javascripts/components/features/report/index.jsx +++ b/app/assets/javascripts/components/features/report/index.jsx @@ -27,7 +27,7 @@ const makeMapStateToProps = () => { isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']), account: getAccount(state, accountId), comment: state.getIn(['reports', 'new', 'comment']), - statusIds: state.getIn(['timelines', 'accounts_timelines', accountId, 'items'], Immutable.List()) + statusIds: Immutable.OrderedSet(state.getIn(['timelines', 'accounts_timelines', accountId, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])) }; }; diff --git a/app/assets/javascripts/components/reducers/reports.jsx b/app/assets/javascripts/components/reducers/reports.jsx index 272aff3e5eb3fc3b13aca7faf609264855537838..e1cce1c5faba781b5d98cf4349c39553520b9ed3 100644 --- a/app/assets/javascripts/components/reducers/reports.jsx +++ b/app/assets/javascripts/components/reducers/reports.jsx @@ -25,10 +25,10 @@ export default function reports(state = initialState, action) { map.setIn(['new', 'account_id'], action.account.get('id')); if (state.getIn(['new', 'account_id']) !== action.account.get('id')) { - map.setIn(['new', 'status_ids'], action.status ? Immutable.Set([action.status.get('id')]) : Immutable.Set()); + map.setIn(['new', 'status_ids'], action.status ? Immutable.Set([action.status.getIn(['reblog', 'id'], action.status.get('id'))]) : Immutable.Set()); map.setIn(['new', 'comment'], ''); } else { - map.updateIn(['new', 'status_ids'], Immutable.Set(), set => set.add(action.status.get('id'))); + map.updateIn(['new', 'status_ids'], Immutable.Set(), set => set.add(action.status.getIn(['reblog', 'id'], action.status.get('id')))); } }); case REPORT_STATUS_TOGGLE: