From 7978f08235ceca22eacae11a88a7703513238cb3 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sat, 1 Jul 2023 20:51:15 +0200 Subject: Deduplicate some api calls --- MatrixRoomUtils.Web/Pages/Rooms/Index.razor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MatrixRoomUtils.Web/Pages/Rooms') diff --git a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor index 20ddd0d..932748d 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/Index.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/Index.razor @@ -1,18 +1,21 @@ @page "/Rooms" +@using MatrixRoomUtils.Core.StateEventTypes

Room list

@if (Rooms is not null) { - + } @code { private List Rooms { get; set; } + private ProfileResponse 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(); await base.OnInitializedAsync(); -- cgit 1.5.1