diff --git a/src/domain/session/leftpanel/InviteTileViewModel.js b/src/domain/session/leftpanel/InviteTileViewModel.js index 09c11fb8..bdc0e193 100644 --- a/src/domain/session/leftpanel/InviteTileViewModel.js +++ b/src/domain/session/leftpanel/InviteTileViewModel.js @@ -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; } } diff --git a/src/matrix/room/create.ts b/src/matrix/room/create.ts index e3a1ed4d..6dd9340a 100644 --- a/src/matrix/room/create.ts +++ b/src/matrix/room/create.ts @@ -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 }