Fix new profile dropdown blocking without confirmation modal (#38605)
This commit is contained in:
parent
f091e7050c
commit
99a219036f
@ -4,7 +4,6 @@ import type { FC } from 'react';
|
|||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
blockAccount,
|
|
||||||
followAccount,
|
followAccount,
|
||||||
pinAccount,
|
pinAccount,
|
||||||
unblockAccount,
|
unblockAccount,
|
||||||
@ -13,6 +12,7 @@ import {
|
|||||||
} from '@/mastodon/actions/accounts';
|
} from '@/mastodon/actions/accounts';
|
||||||
import { removeAccountFromFollowers } from '@/mastodon/actions/accounts_typed';
|
import { removeAccountFromFollowers } from '@/mastodon/actions/accounts_typed';
|
||||||
import { showAlert } from '@/mastodon/actions/alerts';
|
import { showAlert } from '@/mastodon/actions/alerts';
|
||||||
|
import { initBlockModal } from '@/mastodon/actions/blocks';
|
||||||
import { directCompose, mentionCompose } from '@/mastodon/actions/compose';
|
import { directCompose, mentionCompose } from '@/mastodon/actions/compose';
|
||||||
import {
|
import {
|
||||||
initDomainBlockModal,
|
initDomainBlockModal,
|
||||||
@ -435,7 +435,7 @@ function redesignMenuItems({
|
|||||||
if (relationship?.blocking) {
|
if (relationship?.blocking) {
|
||||||
dispatch(unblockAccount(account.id));
|
dispatch(unblockAccount(account.id));
|
||||||
} else {
|
} else {
|
||||||
dispatch(blockAccount(account.id));
|
dispatch(initBlockModal(account));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dangerous: true,
|
dangerous: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user