Fix new profile dropdown blocking without confirmation modal (#38605)

This commit is contained in:
Claire 2026-04-08 13:24:44 +02:00 committed by GitHub
parent f091e7050c
commit 99a219036f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,