From 4c0167ed74cfc00f67ca8db6409d19470a396ffd Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 10 Feb 2022 11:19:43 +0100 Subject: [PATCH] don't show spinner in left panel when room creation fails --- .../RoomBeingCreatedTileViewModel.js | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/domain/session/leftpanel/RoomBeingCreatedTileViewModel.js b/src/domain/session/leftpanel/RoomBeingCreatedTileViewModel.js index c80fba6c..e6fc4cee 100644 --- a/src/domain/session/leftpanel/RoomBeingCreatedTileViewModel.js +++ b/src/domain/session/leftpanel/RoomBeingCreatedTileViewModel.js @@ -25,15 +25,13 @@ export class RoomBeingCreatedTileViewModel extends BaseTileViewModel { this._url = this.urlCreator.openRoomActionUrl(this._roomBeingCreated.id); } - get busy() { return true; } - - get kind() { - return "roomBeingCreated"; - } - - get url() { - return this._url; - } + get busy() { return !this._roomBeingCreated.error; } + get kind() { return "roomBeingCreated"; } + get isHighlighted() { return !this.busy; } + get badgeCount() { return !this.busy && this.i18n`Failed`; } + get url() { return this._url; } + get name() { return this._roomBeingCreated.name; } + get _avatarSource() { return this._roomBeingCreated; } compare(other) { const parentComparison = super.compare(other); @@ -43,14 +41,6 @@ export class RoomBeingCreatedTileViewModel extends BaseTileViewModel { return other._roomBeingCreated.name.localeCompare(this._roomBeingCreated.name); } - get name() { - return this._roomBeingCreated.name; - } - - get _avatarSource() { - return this._roomBeingCreated; - } - avatarUrl(size) { // allow blob url which doesn't need mxc => http resolution return this._roomBeingCreated.avatarBlobUrl ?? super.avatarUrl(size);