From def33cc092ae2c6defcc218b108b7c99cbfb8581 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 2 Jul 2023 01:01:09 +0200 Subject: Prefetch room info --- MatrixRoomUtils.Web/Pages/Rooms/Index.razor | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'MatrixRoomUtils.Web/Pages/Rooms/Index.razor') diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor index 932748d..d88d5b2 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor @@ -1,5 +1,6 @@ @page "/Rooms" @using MatrixRoomUtils.Core.StateEventTypes +@using MatrixRoomUtils.Core.StateEventTypes.Spec

Room list

@if (Rooms is not null) { @@ -9,14 +10,14 @@ @code { - private List Rooms { get; set; } - private ProfileResponse GlobalProfile { get; set; } - + private List Rooms { get; set; } + private ProfileResponseEventData GlobalProfile { get; set; } + protected override async Task OnInitializedAsync() { var hs = await MRUStorage.GetCurrentSessionOrNavigate(); if (hs is null) return; GlobalProfile = await hs.GetProfile(hs.WhoAmI.UserId); - Rooms = await hs.GetJoinedRooms(); + Rooms = (await hs.GetJoinedRooms()).Select(x => new RoomInfo() { Room = x }).ToList(); await base.OnInitializedAsync(); } -- cgit 1.4.1