Delete Message Modal: Fix modal window closing animation (#5580)

This commit is contained in:
Alexander Zinchuk 2025-02-13 14:27:57 +01:00
parent 635545a5fd
commit c552fc5f34
3 changed files with 5 additions and 13 deletions

View File

@ -129,8 +129,9 @@ const DeleteMessageModal: FC<OwnProps & StateProps> = ({
}
const global = getGlobal();
const senderArray = getSendersFromSelectedMessages(global, chat.id, messageIds);
return senderArray ? unique(senderArray).filter((peer) => peer?.id !== chat?.id && peer?.id !== linkedChatId) : MEMO_EMPTY_ARRAY;
}, [chat, isChannel, messageIds]);
return senderArray ? unique(senderArray)
.filter((peer) => peer?.id !== chat?.id && peer?.id !== linkedChatId) : MEMO_EMPTY_ARRAY;
}, [chat, isChannel, linkedChatId, messageIds]);
const buildNestedOptionListWithAvatars = useLastCallback(() => {
return peerList.map((member) => {
@ -411,10 +412,6 @@ const DeleteMessageModal: FC<OwnProps & StateProps> = ({
);
}
if (!messageIds) {
return undefined;
}
return (
<Modal
isOpen={isOpen}
@ -448,7 +445,7 @@ const DeleteMessageModal: FC<OwnProps & StateProps> = ({
)}
{(canDeleteForAll || chatBot || !shouldShowOption) && (
<>
<p>{messageIds.length > 1
<p>{messageIds && messageIds.length > 1
? lang('AreYouSureDeleteFewMessages') : lang('AreYouSureDeleteSingleMessage')}
</p>
{willDeleteForCurrentUserOnly && (

View File

@ -57,11 +57,6 @@
flex-grow: 1;
}
.checkbox {
align-self: center;
margin-bottom: 1.5rem;
}
.disclaimer {
font-size: 0.875rem;
align-self: center;

View File

@ -204,7 +204,7 @@ const PaidReactionModal = ({
</div>
)}
<Checkbox
className={styles.checkbox}
className="dialog-checkbox"
checked={shouldShowUp}
onChange={handleAnonimityChange}
label={oldLang('StarsReactionShowMeInTopSenders')}