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 global = getGlobal();
|
||||||
const senderArray = getSendersFromSelectedMessages(global, chat.id, messageIds);
|
const senderArray = getSendersFromSelectedMessages(global, chat.id, messageIds);
|
||||||
return senderArray ? unique(senderArray).filter((peer) => peer?.id !== chat?.id && peer?.id !== linkedChatId) : MEMO_EMPTY_ARRAY;
|
return senderArray ? unique(senderArray)
|
||||||
}, [chat, isChannel, messageIds]);
|
.filter((peer) => peer?.id !== chat?.id && peer?.id !== linkedChatId) : MEMO_EMPTY_ARRAY;
|
||||||
|
}, [chat, isChannel, linkedChatId, messageIds]);
|
||||||
|
|
||||||
const buildNestedOptionListWithAvatars = useLastCallback(() => {
|
const buildNestedOptionListWithAvatars = useLastCallback(() => {
|
||||||
return peerList.map((member) => {
|
return peerList.map((member) => {
|
||||||
@ -411,10 +412,6 @@ const DeleteMessageModal: FC<OwnProps & StateProps> = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!messageIds) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
@ -448,7 +445,7 @@ const DeleteMessageModal: FC<OwnProps & StateProps> = ({
|
|||||||
)}
|
)}
|
||||||
{(canDeleteForAll || chatBot || !shouldShowOption) && (
|
{(canDeleteForAll || chatBot || !shouldShowOption) && (
|
||||||
<>
|
<>
|
||||||
<p>{messageIds.length > 1
|
<p>{messageIds && messageIds.length > 1
|
||||||
? lang('AreYouSureDeleteFewMessages') : lang('AreYouSureDeleteSingleMessage')}
|
? lang('AreYouSureDeleteFewMessages') : lang('AreYouSureDeleteSingleMessage')}
|
||||||
</p>
|
</p>
|
||||||
{willDeleteForCurrentUserOnly && (
|
{willDeleteForCurrentUserOnly && (
|
||||||
|
|||||||
@ -57,11 +57,6 @@
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox {
|
|
||||||
align-self: center;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disclaimer {
|
.disclaimer {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
|||||||
@ -204,7 +204,7 @@ const PaidReactionModal = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className={styles.checkbox}
|
className="dialog-checkbox"
|
||||||
checked={shouldShowUp}
|
checked={shouldShowUp}
|
||||||
onChange={handleAnonimityChange}
|
onChange={handleAnonimityChange}
|
||||||
label={oldLang('StarsReactionShowMeInTopSenders')}
|
label={oldLang('StarsReactionShowMeInTopSenders')}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user