don't show spinner in left panel when room creation fails

This commit is contained in:
Bruno Windels 2022-02-10 11:19:43 +01:00
parent 024a6c06aa
commit 4c0167ed74

View file

@ -25,15 +25,13 @@ export class RoomBeingCreatedTileViewModel extends BaseTileViewModel {
this._url = this.urlCreator.openRoomActionUrl(this._roomBeingCreated.id); this._url = this.urlCreator.openRoomActionUrl(this._roomBeingCreated.id);
} }
get busy() { return true; } get busy() { return !this._roomBeingCreated.error; }
get kind() { return "roomBeingCreated"; }
get kind() { get isHighlighted() { return !this.busy; }
return "roomBeingCreated"; get badgeCount() { return !this.busy && this.i18n`Failed`; }
} get url() { return this._url; }
get name() { return this._roomBeingCreated.name; }
get url() { get _avatarSource() { return this._roomBeingCreated; }
return this._url;
}
compare(other) { compare(other) {
const parentComparison = super.compare(other); const parentComparison = super.compare(other);
@ -43,14 +41,6 @@ export class RoomBeingCreatedTileViewModel extends BaseTileViewModel {
return other._roomBeingCreated.name.localeCompare(this._roomBeingCreated.name); return other._roomBeingCreated.name.localeCompare(this._roomBeingCreated.name);
} }
get name() {
return this._roomBeingCreated.name;
}
get _avatarSource() {
return this._roomBeingCreated;
}
avatarUrl(size) { avatarUrl(size) {
// allow blob url which doesn't need mxc => http resolution // allow blob url which doesn't need mxc => http resolution
return this._roomBeingCreated.avatarBlobUrl ?? super.avatarUrl(size); return this._roomBeingCreated.avatarBlobUrl ?? super.avatarUrl(size);