diff options
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/IndexComponents')
-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; |