about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Rooms/Index.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-01 20:51:15 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-07-01 20:51:15 +0200
commit7978f08235ceca22eacae11a88a7703513238cb3 (patch)
tree6a7058f21f6040cc1e9396a85774bc16ea133c9e /MatrixRoomUtils.Web/Pages/Rooms/Index.razor
parentTodays progress (diff)
downloadMatrixUtils-7978f08235ceca22eacae11a88a7703513238cb3.tar.xz
Deduplicate some api calls
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Rooms/Index.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Rooms/Index.razor5
1 files changed, 4 insertions, 1 deletions
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
 <h3>Room list</h3>
 
 @if (Rooms is not null) {
-    <RoomList Rooms="Rooms"></RoomList>
+    <RoomList Rooms="Rooms" GlobalProfile="@GlobalProfile"></RoomList>
 }
 
 
 @code {
 
     private List<GenericRoom> 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();