fix unrelated bug: invite sorting order wasn't stable in left panel

as the timestamp is the same when you receive the invite during your
first sync
This commit is contained in:
Bruno Windels 2022-02-10 09:39:27 +01:00
parent 5c085efc10
commit 74f7879cb6
2 changed files with 7 additions and 2 deletions

View File

@ -39,6 +39,10 @@ export class InviteTileViewModel extends BaseTileViewModel {
if (parentComparison !== 0) {
return parentComparison;
}
return other._invite.timestamp - this._invite.timestamp;
const timeDiff = other._invite.timestamp - this._invite.timestamp;
if (timeDiff !== 0) {
return timeDiff;
}
return this._invite.id < other._invite.id ? -1 : 1;
}
}

View File

@ -194,7 +194,8 @@ export class RoomBeingCreated extends EventEmitter<{change: never}> {
get name() { return this._calculatedName; }
get isBeingCreated(): boolean { return true; }
get error(): Error | undefined { return this._error; }
get id() { return this.localId; }
cancel() {
// TODO: remove from collection somehow
}