From 13c8774d454b81a2b207d77976ce884539cdadf0 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 6 Oct 2021 10:25:27 +0100 Subject: [PATCH] Tweak Room Hierarchy root visibility and add loading getter --- src/room-hierarchy.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/room-hierarchy.ts b/src/room-hierarchy.ts index 93b04dd0db3..16b6014ea60 100644 --- a/src/room-hierarchy.ts +++ b/src/room-hierarchy.ts @@ -47,7 +47,7 @@ export class RoomHierarchy { * @constructor */ constructor( - private readonly root: Room, + public readonly root: Room, private readonly pageSize?: number, private readonly maxDepth?: number, private readonly suggestedOnly = false, @@ -61,6 +61,10 @@ export class RoomHierarchy { return !!this.serverSupportError || !!this.nextBatch || !this._rooms; } + public get loading(): boolean { + return !!this.loadRequest; + } + public get rooms(): IHierarchyRoom[] { return this._rooms; }