From d9dd9bbf4d8a49a44172568bf352126ebb25d7a7 Mon Sep 17 00:00:00 2001 From: Moritz <101179677+Moritz-Deiaco@users.noreply.github.com> Date: Tue, 14 May 2024 00:42:00 +0200 Subject: [PATCH] Optimized it, as Masu wished --- Moonlight/Core/UI/Views/Admin/Index.razor | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Moonlight/Core/UI/Views/Admin/Index.razor b/Moonlight/Core/UI/Views/Admin/Index.razor index 45de84b..2cb5718 100644 --- a/Moonlight/Core/UI/Views/Admin/Index.razor +++ b/Moonlight/Core/UI/Views/Admin/Index.razor @@ -18,7 +18,9 @@
Users
- @Users.Count + + @UserCount +
@@ -38,7 +40,7 @@ Servers - @Servers.Count + @ServerCount
@@ -56,16 +58,16 @@ @* This is just the start of this admin page, there will still be added more during the developement process *@ @code { - private List Servers; - private List Users; + private int ServerCount; + private int UserCount; private async Task Load(LazyLoader arg) { await Task.Run(() => { arg.SetText("Loading Information..."); - Servers = ServerRepository.Get().ToList(); - Users = UserRepository.Get().ToList(); + ServerCount = ServerRepository.Get().Count(); + UserCount = UserRepository.Get().Count(); }); } } \ No newline at end of file