fix: fix typo pushing new messages to redux store

pull/2940/head
Audric Ackermann 2 years ago
parent 7d5b660bc1
commit 6e4052c4ab

@ -137,7 +137,6 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
} }
public getMessageModelProps(): MessageModelPropsWithoutConvoProps { public getMessageModelProps(): MessageModelPropsWithoutConvoProps {
perfStart(`getPropsMessage-${this.id}`);
const propsForDataExtractionNotification = this.getPropsForDataExtractionNotification(); const propsForDataExtractionNotification = this.getPropsForDataExtractionNotification();
const propsForGroupInvitation = this.getPropsForGroupInvitation(); const propsForGroupInvitation = this.getPropsForGroupInvitation();
const propsForGroupUpdateMessage = this.getPropsForGroupUpdateMessage(); const propsForGroupUpdateMessage = this.getPropsForGroupUpdateMessage();
@ -180,7 +179,7 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
...this.getPropsForExpiringMessage(), ...this.getPropsForExpiringMessage(),
}; };
} }
perfEnd(`getPropsMessage-${this.id}`, 'getPropsMessage');
return messageProps; return messageProps;
} }

@ -538,7 +538,7 @@ function handleMessageChangedOrAdded(
} }
// sorting happens in the selector // sorting happens in the selector
state.messages.push(changedOrAddedMessageProps);
state.mostRecentMessageId = updateMostRecentMessageId(state); state.mostRecentMessageId = updateMostRecentMessageId(state);
return state; return state;
} }

Loading…
Cancel
Save