diff --git a/src/domain/session/leftpanel/RoomTileViewModel.js b/src/domain/session/leftpanel/RoomTileViewModel.js index fe199ff1..eebea618 100644 --- a/src/domain/session/leftpanel/RoomTileViewModel.js +++ b/src/domain/session/leftpanel/RoomTileViewModel.js @@ -17,16 +17,11 @@ limitations under the License. import {BaseTileViewModel} from "./BaseTileViewModel.js"; -function isSortedAsUnread(vm) { - return vm.isUnread || (vm.isOpen && vm._wasUnreadWhenOpening); -} - export class RoomTileViewModel extends BaseTileViewModel { constructor(options) { super(options); const {room} = options; this._room = room; - this._wasUnreadWhenOpening = false; this._url = this.urlCreator.openRoomActionUrl(this._room.id); } @@ -57,12 +52,6 @@ export class RoomTileViewModel extends BaseTileViewModel { } return -1; } - if (isSortedAsUnread(this) !== isSortedAsUnread(other)) { - if (isSortedAsUnread(this)) { - return -1; - } - return 1; - } const myTimestamp = myRoom.lastMessageTimestamp; const theirTimestamp = theirRoom.lastMessageTimestamp; const myTimestampValid = Number.isSafeInteger(myTimestamp); @@ -105,10 +94,4 @@ export class RoomTileViewModel extends BaseTileViewModel { get _avatarSource() { return this._room; } - - open() { - if (super.open()) { - this._wasUnreadWhenOpening = this._room.isUnread; - } - } }