From 5d1bc61f61c17c1a6bb38c679602424d2b5c9768 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 21 Aug 2020 13:45:55 +0200 Subject: [PATCH] don't open a room when already open --- src/domain/session/roomlist/RoomTileViewModel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/domain/session/roomlist/RoomTileViewModel.js b/src/domain/session/roomlist/RoomTileViewModel.js index d79b4dbe..13a01309 100644 --- a/src/domain/session/roomlist/RoomTileViewModel.js +++ b/src/domain/session/roomlist/RoomTileViewModel.js @@ -44,10 +44,12 @@ export class RoomTileViewModel extends ViewModel { } open() { - this._isOpen = true; - this._wasUnreadWhenOpening = this._room.isUnread; - this.emitChange("isOpen"); - this._emitOpen(this._room, this); + if (!this._isOpen) { + this._isOpen = true; + this._wasUnreadWhenOpening = this._room.isUnread; + this.emitChange("isOpen"); + this._emitOpen(this._room, this); + } } compare(other) {