Better insertion order

This commit is contained in:
Eric Bailey
2024-04-30 20:19:29 -05:00
parent 24c8165e05
commit 6c890c4b7b
+5
View File
@@ -230,6 +230,11 @@ export class Chat {
TempDmDefs.isLogCreateMessage(log) &&
TempDmDefs.isMessageView(log.message)
) {
if (this.newMessages.has(log.message.id)) {
// Trust the log as the source of truth on ordering
// TODO test this
this.newMessages.delete(log.message.id)
}
this.newMessages.set(log.message.id, log.message)
} else if (
TempDmDefs.isLogDeleteMessage(log) &&