diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-13 20:25:05 +0200 |
commit | 712ad189c99570f686ab779782b2a873e172428e (patch) | |
tree | 6102e4719416e71522e9143fa4e06951258bd77c /MatrixRoomUtils.Web/Shared/InlineUserItem.razor | |
parent | Fix passwords being visible during editing (diff) | |
download | MatrixUtils-712ad189c99570f686ab779782b2a873e172428e.tar.xz |
Change syntax style
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/InlineUserItem.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Shared/InlineUserItem.razor | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor index 56131c8..9833c62 100644 --- a/MatrixRoomUtils.Web/Shared/InlineUserItem.razor +++ b/MatrixRoomUtils.Web/Shared/InlineUserItem.razor @@ -4,8 +4,7 @@ <span style="position: relative; top: -5px;">@ProfileName</span> <div style="display: inline-block;"> - @if (ChildContent != null) - { + @if (ChildContent != null) { @ChildContent } </div> @@ -25,15 +24,13 @@ [Parameter] public string? ProfileAvatar { get; set; } = null; - + [Parameter] public string? ProfileName { get; set; } = null; - private static SemaphoreSlim _semaphoreSlim = new(128); - protected override async Task OnInitializedAsync() - { + protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); @@ -41,19 +38,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; |