Updated UnfollowModal

• Updated:
- UnfollowModal to fix the issue with people with it enabled being unable to unfollow others
- All instances of instantiating the UnfollowModal to pass in account instead of accountId
This commit is contained in:
mgabdev
2020-06-12 17:55:39 -04:00
parent 03e28831f3
commit dd00db13bc
4 changed files with 20 additions and 45 deletions

View File

@@ -22,7 +22,6 @@ import Text from '../text'
import List from '../list'
const messages = defineMessages({
unfollowConfirm: { id: 'confirmations.unfollow.confirm', defaultMessage: 'Unfollow' },
blockAndReport: { id: 'confirmations.block.block_and_report', defaultMessage: 'Block & Report' },
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
follow: { id: 'account.follow', defaultMessage: 'Follow' },
@@ -66,7 +65,7 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
if (account.getIn(['relationship', 'following']) || account.getIn(['relationship', 'requested'])) {
if (unfollowModal) {
dispatch(openModal('UNFOLLOW', {
accountId: account.get('id'),
account,
}))
} else {
dispatch(unfollowAccount(account.get('id')))