From 201ca20646d430027fbf478da4a9c3db68f0bee6 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 24 Nov 2021 15:19:54 +0000 Subject: [PATCH] cleanup --- src/domain/session/leftpanel/PlaceholderRoomTileViewModel.js | 1 + src/domain/session/leftpanel/RoomTileViewModel.js | 2 +- src/matrix/Session.js | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/session/leftpanel/PlaceholderRoomTileViewModel.js b/src/domain/session/leftpanel/PlaceholderRoomTileViewModel.js index 5a6db640..b4ae62a5 100644 --- a/src/domain/session/leftpanel/PlaceholderRoomTileViewModel.js +++ b/src/domain/session/leftpanel/PlaceholderRoomTileViewModel.js @@ -36,6 +36,7 @@ export class PlaceholderRoomTileViewModel extends BaseTileViewModel { } compare(other) { + // TODO: factor this out with the compare(other) of the room tile as it does this check as well. if (other._room.index !== undefined) { return this._room.index > other._room.index ? 1 : -1; } diff --git a/src/domain/session/leftpanel/RoomTileViewModel.js b/src/domain/session/leftpanel/RoomTileViewModel.js index 51b3fdf0..db380f5d 100644 --- a/src/domain/session/leftpanel/RoomTileViewModel.js +++ b/src/domain/session/leftpanel/RoomTileViewModel.js @@ -41,7 +41,7 @@ export class RoomTileViewModel extends BaseTileViewModel { // sync v3 has its own ordering, use it if we have an index if (this._room.index !== undefined && other._room.index !== undefined) { - return this._room.index > other._room.index ? 1 : -1;; + return this._room.index > other._room.index ? 1 : -1; } /* diff --git a/src/matrix/Session.js b/src/matrix/Session.js index 217de25e..37fd90ad 100644 --- a/src/matrix/Session.js +++ b/src/matrix/Session.js @@ -401,7 +401,6 @@ export class Session { room.setInvite(invite); } } - this._rooms.add(room.id, room); } dispose() {