diff options
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/UserListItem.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Shared/UserListItem.razor | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/MatrixRoomUtils.Web/Shared/UserListItem.razor b/MatrixRoomUtils.Web/Shared/UserListItem.razor index d357b0d..43c71ab 100644 --- a/MatrixRoomUtils.Web/Shared/UserListItem.razor +++ b/MatrixRoomUtils.Web/Shared/UserListItem.razor @@ -4,8 +4,7 @@ <span style="vertical-align: middle; margin-right: 8px; border-radius: 75px;">@profileName</span> <div style="display: inline-block;"> - @if (ChildContent != null) - { + @if (ChildContent != null) { @ChildContent } </div> @@ -26,11 +25,9 @@ private string? profileAvatar { get; set; } = "/icon-192.png"; private string? profileName { get; set; } = "Loading..."; - private static SemaphoreSlim _semaphoreSlim = new(128); - protected override async Task OnInitializedAsync() - { + protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); @@ -38,19 +35,14 @@ var hs = await new AuthenticatedHomeServer(RuntimeCache.CurrentHomeServer.UserId, RuntimeCache.CurrentHomeServer.AccessToken, RuntimeCache.CurrentHomeServer.HomeServerDomain).Configure(); - if (User == null) - { - if (UserId == null) - { + if (User == null) { + if (UserId == null) { throw new ArgumentNullException(nameof(UserId)); } User = await hs.GetProfile(UserId); } - else - { - // UserId = User.; - } - + + // UserId = User.; profileAvatar = RuntimeCache.CurrentHomeServer.ResolveMediaUri(User.AvatarUrl); profileName = User.DisplayName; |