about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.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/Rooms/StateViewer.razor
parentAdd MxApiExtensions submodule (diff)
downloadMatrixUtils-83029c478f411bcadd3be53ac4dc53d88b3c8462.tar.xz
Code cleanup
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor12
1 files changed, 6 insertions, 6 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor b/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor
index cf23c36..5a48b32 100644
--- a/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor
+++ b/MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor
@@ -91,12 +91,12 @@
                 FilteredEvents.Add(_ev);
             }
             StateLoaded++;
-            if ((DateTime.Now - _lastUpdate).TotalMilliseconds > 100) {
-                _lastUpdate = DateTime.Now;
-                status = $"Loaded {StateLoaded} state events";
-                StateHasChanged();
-                await Task.Delay(0);
-            }
+
+            if (!((DateTime.Now - _lastUpdate).TotalMilliseconds > 100)) continue;
+            _lastUpdate = DateTime.Now;
+            status = $"Loaded {StateLoaded} state events";
+            StateHasChanged();
+            await Task.Delay(0);
         }
 
         StateHasChanged();