about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Index.razor
diff options
context:
space:
mode:
authorEmma@Rory& <root@rory.gay>2023-08-14 19:46:33 +0200
committerEmma@Rory& <root@rory.gay>2023-08-14 19:46:33 +0200
commit83029c478f411bcadd3be53ac4dc53d88b3c8462 (patch)
tree279d62e53e55e862e4851f1447de12e47e3fce62 /MatrixRoomUtils.Web/Pages/Index.razor
parentAdd MxApiExtensions submodule (diff)
downloadMatrixUtils-83029c478f411bcadd3be53ac4dc53d88b3c8462.tar.xz
Code cleanup
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Index.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Index.razor9
1 files changed, 4 insertions, 5 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Index.razor b/MatrixRoomUtils.Web/Pages/Index.razor
index 65ba68b..1004ee3 100644
--- a/MatrixRoomUtils.Web/Pages/Index.razor
+++ b/MatrixRoomUtils.Web/Pages/Index.razor
@@ -15,16 +15,15 @@ Small collection of tools to do not-so-everyday things.
 <form>
     @foreach (var (auth, user) in _users.OrderByDescending(x=>x.Value.RoomCount)) {
         var _auth = auth;
-        var _user = user;
         <div style="margin-bottom: 1em;">
-            <img style="border-radius: 50%; height: 3em; width: 3em;" src="@_user.AvatarUrl"/>
+            <img style="border-radius: 50%; height: 3em; width: 3em;" src="@user.AvatarUrl"/>
             <p style="margin-left: 1em; margin-top: -0.5em; display: inline-block;">
                 <input type="radio" name="csa" checked="@(_currentSession.AccessToken == _auth.AccessToken)" @onclick="@(()=>SwitchSession(_auth))" style="text-decoration-line: unset;"/>
-                <b>@_user.DisplayName</b> on <b>@_auth.Homeserver</b>
+                <b>@user.DisplayName</b> on <b>@_auth.Homeserver</b>
                 <a role="button" @onclick="@(() => RemoveUser(_auth))">Remove</a>
 
             </p>
-            <p style="margin-top: -1.5em; margin-left: 4em;">Member of @_user.RoomCount rooms</p>
+            <p style="margin-top: -1.5em; margin-left: 4em;">Member of @user.RoomCount rooms</p>
 
         </div>
     }
@@ -69,7 +68,7 @@ Small collection of tools to do not-so-everyday things.
     private class UserInfo {
         internal string AvatarUrl { get; set; }
         internal string DisplayName { get; set; }
-        internal int RoomCount { get; set; } = 0;
+        internal int RoomCount { get; set; }
     }
 
     private async Task RemoveUser(LoginResponse auth) {