forked from mystiq/hydrogen-web
pending events are not certain to be sorted here
This commit is contained in:
parent
3ed72df620
commit
b26f7df689
2 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue