diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-25 03:07:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-25 03:07:05 +0200 |
commit | f866946fbbe962c712049327ade9dcbd43900295 (patch) | |
tree | 3400fcce20f68a6ef3eb130f4ef57733e346d0e9 /MatrixRoomUtils.Web/Shared/IndexComponents/IndexUserItem.razor | |
parent | Working sync (diff) | |
download | MatrixUtils-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.razor | 7 |
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; |