[Glitch] Fix new profile dropdown blocking without confirmation modal
Port 99a219036f36cbba20b6f862e6cc956526497f8d to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
8032905c55
commit
979b1a78cb
@ -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 '@/flavours/glitch/actions/accounts';
|
} from '@/flavours/glitch/actions/accounts';
|
||||||
import { removeAccountFromFollowers } from '@/flavours/glitch/actions/accounts_typed';
|
import { removeAccountFromFollowers } from '@/flavours/glitch/actions/accounts_typed';
|
||||||
import { showAlert } from '@/flavours/glitch/actions/alerts';
|
import { showAlert } from '@/flavours/glitch/actions/alerts';
|
||||||
|
import { initBlockModal } from '@/flavours/glitch/actions/blocks';
|
||||||
import {
|
import {
|
||||||
directCompose,
|
directCompose,
|
||||||
mentionCompose,
|
mentionCompose,
|
||||||
@ -438,7 +438,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