Improve timeline rendering performance
This commit is contained in:
parent
c319a089d2
commit
167b2f4f1c
11 changed files with 329 additions and 106 deletions
|
@ -2,13 +2,11 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import {
|
||||
isEmpty,
|
||||
isNumber,
|
||||
isObject,
|
||||
mapValues,
|
||||
maxBy,
|
||||
noop,
|
||||
omit,
|
||||
partition,
|
||||
pick,
|
||||
union,
|
||||
|
@ -58,7 +56,7 @@ import {
|
|||
SendStatus,
|
||||
isSent,
|
||||
sendStateReducer,
|
||||
someSendStatus,
|
||||
someRecipientSendStatus,
|
||||
} from '../messages/MessageSendState';
|
||||
import { migrateLegacyReadStatus } from '../messages/migrateLegacyReadStatus';
|
||||
import { migrateLegacySendAttributes } from '../messages/migrateLegacySendAttributes';
|
||||
|
@ -824,11 +822,14 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
|
||||
public hasSuccessfulDelivery(): boolean {
|
||||
const sendStateByConversationId = this.get('sendStateByConversationId');
|
||||
const withoutMe = omit(
|
||||
sendStateByConversationId,
|
||||
window.ConversationController.getOurConversationIdOrThrow()
|
||||
const ourConversationId =
|
||||
window.ConversationController.getOurConversationIdOrThrow();
|
||||
|
||||
return someRecipientSendStatus(
|
||||
sendStateByConversationId ?? {},
|
||||
ourConversationId,
|
||||
isSent
|
||||
);
|
||||
return isEmpty(withoutMe) || someSendStatus(withoutMe, isSent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue