diff --git a/src/matrix/room/sending/SendQueue.js b/src/matrix/room/sending/SendQueue.js index b147d0f1..ec7296e8 100644 --- a/src/matrix/room/sending/SendQueue.js +++ b/src/matrix/room/sending/SendQueue.js @@ -18,7 +18,7 @@ export default class SendQueue { if (pendingEvents.length) { console.info(`SendQueue for room ${roomId} has ${pendingEvents.length} pending events`, pendingEvents); } - this._pendingEvents.setManySorted(pendingEvents.map(data => new PendingEvent(data))); + this._pendingEvents.setManyUnsorted(pendingEvents.map(data => new PendingEvent(data))); this._isSending = false; this._offline = false; this._amountSent = 0; diff --git a/src/observable/list/SortedArray.js b/src/observable/list/SortedArray.js index d38f94fd..6b34afdf 100644 --- a/src/observable/list/SortedArray.js +++ b/src/observable/list/SortedArray.js @@ -8,6 +8,10 @@ export default class SortedArray extends BaseObservableList { this._items = []; } + setManyUnsorted(items) { + this.setManySorted(items); + } + setManySorted(items) { // TODO: we can make this way faster by only looking up the first and last key, // and merging whatever is inbetween with items