diff options
author | Emma@Rory& <root@rory.gay> | 2023-08-14 19:46:33 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-08-14 19:46:33 +0200 |
commit | 83029c478f411bcadd3be53ac4dc53d88b3c8462 (patch) | |
tree | 279d62e53e55e862e4851f1447de12e47e3fce62 /MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor | |
parent | Add MxApiExtensions submodule (diff) | |
download | MatrixUtils-83029c478f411bcadd3be53ac4dc53d88b3c8462.tar.xz |
Code cleanup
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Pages/Rooms/StateViewer.razor | 12 |
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(); |