about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-25 03:07:05 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-25 03:07:05 +0200
commitf866946fbbe962c712049327ade9dcbd43900295 (patch)
tree3400fcce20f68a6ef3eb130f4ef57733e346d0e9 /MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor
parentWorking sync (diff)
downloadMatrixUtils-f866946fbbe962c712049327ade9dcbd43900295.tar.xz
Working state, refactored Rory&::LibMatrix
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor')
-rw-r--r--MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor7
1 files changed, 4 insertions, 3 deletions
diff --git a/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor b/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor
index 8ab44fb..975da43 100644
--- a/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor
+++ b/MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor
@@ -22,12 +22,13 @@
     private int _roomCount { get; set; } = 0;
 
     protected override async Task OnInitializedAsync() {
-        var hs = await new AuthenticatedHomeServer(User.LoginResponse.HomeServer, User.AccessToken, TODO).Configure();
+        await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
+
         if (User.Profile.AvatarUrl != null && User.Profile.AvatarUrl != "")
-            _avatarUrl = hs.ResolveMediaUri(User.Profile.AvatarUrl);
+            _avatarUrl = RuntimeCache.CurrentHomeServer.ResolveMediaUri(User.Profile.AvatarUrl);
         else _avatarUrl = "https://api.dicebear.com/6.x/identicon/svg?seed=" + User.LoginResponse.UserId;
         try {
-            _roomCount = (await hs.GetJoinedRooms()).Count;
+            _roomCount = (await RuntimeCache.CurrentHomeServer.GetJoinedRooms()).Count;
         }
         catch {
             _roomCount = -1;