Delete Message Modal: Fix modal window closing animation (#5580)
This commit is contained in:
parent
635545a5fd
commit
c552fc5f34
@ -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 && (
|
||||
|
||||
@ -57,11 +57,6 @@
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
align-self: center;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.disclaimer {
|
||||
font-size: 0.875rem;
|
||||
align-self: center;
|
||||
|
||||
@ -204,7 +204,7 @@ const PaidReactionModal = ({
|
||||
</div>
|
||||
)}
|
||||
<Checkbox
|
||||
className={styles.checkbox}
|
||||
className="dialog-checkbox"
|
||||
checked={shouldShowUp}
|
||||
onChange={handleAnonimityChange}
|
||||
label={oldLang('StarsReactionShowMeInTopSenders')}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user