diff options
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor b/MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor index c654b13..82b5d75 100644 --- a/MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor +++ b/MatrixRoomUtils.Web/Pages/RoomState/RoomStateRoomList.razor @@ -3,16 +3,15 @@ @inject NavigationManager NavigationManager <h3>Room state viewer - Room list</h3> <hr/> -@if (Rooms.Count == 0) -{ +@if (Rooms.Count == 0) { <p>You are not in any rooms!</p> @* <p>Loading progress: @checkedRoomCount/@totalRoomCount</p> *@ } -else -{ - @foreach (var room in Rooms) - { - <a style="color: unset; text-decoration: unset;" href="/RoomStateViewer/@room.Replace('.','~')"><RoomListItem RoomId="@room"></RoomListItem></a> +else { + @foreach (var room in Rooms) { + <a style="color: unset; text-decoration: unset;" href="/RoomStateViewer/@room.Replace('.', '~')"> + <RoomListItem RoomId="@room"></RoomListItem> + </a> } <div style="margin-bottom: 4em;"></div> } @@ -21,16 +20,16 @@ else @code { public List<string> Rooms { get; set; } = new(); - protected override async Task OnInitializedAsync() - { + + protected override async Task OnInitializedAsync() { await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); await base.OnInitializedAsync(); - if (RuntimeCache.CurrentHomeServer == null) - { + if (RuntimeCache.CurrentHomeServer == null) { NavigationManager.NavigateTo("/Login"); return; } - Rooms = (await RuntimeCache.CurrentHomeServer.GetJoinedRooms()).Select(x=>x.RoomId).ToList(); + Rooms = (await RuntimeCache.CurrentHomeServer.GetJoinedRooms()).Select(x => x.RoomId).ToList(); Console.WriteLine("Fetched joined rooms!"); } -} \ No newline at end of file + +} \ No newline at end of file |