mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
pending events are not certain to be sorted here
This commit is contained in:
parent
3ed72df620
commit
b26f7df689
@ -18,7 +18,7 @@ export default class SendQueue {
|
|||||||
if (pendingEvents.length) {
|
if (pendingEvents.length) {
|
||||||
console.info(`SendQueue for room ${roomId} has ${pendingEvents.length} pending events`, pendingEvents);
|
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._isSending = false;
|
||||||
this._offline = false;
|
this._offline = false;
|
||||||
this._amountSent = 0;
|
this._amountSent = 0;
|
||||||
|
@ -8,6 +8,10 @@ export default class SortedArray extends BaseObservableList {
|
|||||||
this._items = [];
|
this._items = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setManyUnsorted(items) {
|
||||||
|
this.setManySorted(items);
|
||||||
|
}
|
||||||
|
|
||||||
setManySorted(items) {
|
setManySorted(items) {
|
||||||
// TODO: we can make this way faster by only looking up the first and last key,
|
// TODO: we can make this way faster by only looking up the first and last key,
|
||||||
// and merging whatever is inbetween with items
|
// and merging whatever is inbetween with items
|
||||||
|
Loading…
Reference in New Issue
Block a user