From f866946fbbe962c712049327ade9dcbd43900295 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Sun, 25 Jun 2023 03:07:05 +0200 Subject: Working state, refactored Rory&::LibMatrix --- MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'MatrixRoomUtils.Web/Shared/IndexComponents') 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; -- cgit 1.4.1