Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrrm committed Feb 15, 2023
1 parent 70b54a2 commit f601fe7
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -571,18 +571,15 @@ await RunAndEmitRefreshAsync(async () =>

private async Task IsCentralPackageManagementEnabledAsync(CancellationToken cancellationToken)
{
await NuGetUIThreadHelper.JoinableTaskFactory.RunAsync(async delegate
if (!Model.IsSolution)
{
if (!Model.IsSolution)
await NuGetUIThreadHelper.JoinableTaskFactory.RunAsync(async delegate
{
// Go off the UI thread to perform non-UI operations
await TaskScheduler.Default;
foreach (IProjectContextInfo project in Model.Context.Projects)
{
_detailModel.IsCentralPackageManagementEnabled = await project.IsCentralPackageManagementEnabledAsync(Model.Context.ServiceBroker, cancellationToken);
}
}
});
_detailModel.IsCentralPackageManagementEnabled = await Model.Context.Projects.First().IsCentralPackageManagementEnabledAsync(Model.Context.ServiceBroker, cancellationToken);
});
}
}

private async Task<string> GetSettingsKeyAsync(CancellationToken cancellationToken)
Expand Down

0 comments on commit f601fe7

Please sign in to comment.