From 63d880a42d7616b71fb73f1927a367c2d76b8f16 Mon Sep 17 00:00:00 2001 From: pinzart90 Date: Wed, 7 Feb 2024 09:36:18 -0500 Subject: [PATCH] Update PackageManagerClientViewModel.cs --- .../PackageManager/PackageManagerClientViewModel.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs index d6935ae0af8..8ed18623df7 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs @@ -477,12 +477,8 @@ public List ListAll() { CachedPackageList = new List(); - // Attempt to load user votes prior to using it - if (AuthenticationManager.LoginState.Equals(LoginState.LoggedIn) && Uservotes == null) - { - Task.Run(() => this.Uservotes = this.Model.UserVotes()); - } - + // Calls to Model.UserVotes and Model.ListAll might take a long time to run (so do not use them syncronously in the UI thread) + Uservotes = this.Model.UserVotes(); foreach (var header in Model.ListAll()) { var ele = new PackageManagerSearchElement(header);