Skip to content

Commit

Permalink
Update PackageManagerClientViewModel.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed Feb 7, 2024
1 parent 9598a4f commit 63d880a
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,8 @@ public List<PackageManagerSearchElement> ListAll()
{
CachedPackageList = new List<PackageManagerSearchElement>();

// 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);
Expand Down

0 comments on commit 63d880a

Please sign in to comment.