Scheduled Messages: Fix render errors (#2851)
This commit is contained in:
parent
cbbbd0d374
commit
356c8cd497
@ -248,10 +248,12 @@ const MessageList: FC<OwnProps & StateProps> = ({
|
||||
}
|
||||
|
||||
const listedMessages = viewportIds.map((id) => messagesById[id]).filter(Boolean);
|
||||
|
||||
const orderRule: (keyof ApiMessage)[] = type === 'scheduled' ? ['date', 'id'] : ['id'];
|
||||
return listedMessages.length
|
||||
? groupMessages(orderBy(listedMessages, 'id'), memoUnreadDividerBeforeIdRef.current)
|
||||
? groupMessages(orderBy(listedMessages, orderRule), memoUnreadDividerBeforeIdRef.current)
|
||||
: undefined;
|
||||
}, [messageIds, messagesById, threadFirstMessageId, threadTopMessageId]);
|
||||
}, [messageIds, messagesById, threadFirstMessageId, threadTopMessageId, type]);
|
||||
|
||||
useInterval(() => {
|
||||
if (!messageIds || !messagesById) {
|
||||
|
||||
@ -581,7 +581,7 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
|
||||
onClick={handleSendClick}
|
||||
onContextMenu={canShowCustomSendMenu ? handleContextMenu : undefined}
|
||||
>
|
||||
{lang('Send')}
|
||||
{shouldSchedule ? lang('Next') : lang('Send')}
|
||||
</Button>
|
||||
{canShowCustomSendMenu && (
|
||||
<CustomSendMenu
|
||||
|
||||
@ -1248,6 +1248,7 @@ const Composer: FC<OwnProps & StateProps> = ({
|
||||
shouldForceCompression={shouldForceCompression}
|
||||
shouldForceAsFile={shouldForceAsFile}
|
||||
isForCurrentMessageList={isForCurrentMessageList}
|
||||
shouldSchedule={shouldSchedule}
|
||||
onCaptionUpdate={onCaptionUpdate}
|
||||
onSendSilent={handleSendSilentAttachments}
|
||||
onSend={handleSendAttachments}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user