-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed https://github.com/NuGet/Home/issues/1196 #63
Conversation
_detailModel.Options.ShowPreviewWindow = settings.ShowPreviewWindow; | ||
_detailModel.Options.RemoveDependencies = settings.RemoveDependencies; | ||
_detailModel.Options.ForceRemove = settings.ForceRemove; | ||
_topPanel.CheckboxPrerelease.IsChecked = settings.IncludePrerelease; | ||
|
||
SetSelectedDepencyBehavior(settings.DependencyBehavior); | ||
SetSelectedDepencyBehavior(GetDependencyBehaviorFromConfig(nugetSettings)?? settings.DependencyBehavior); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this easier to debug create a new var for the value before passing it into SetSelectedDepencyBehavior. There should be a space before ?? also.
It looks like the null checks for both settings and nugetSettings have been dropped in the new code, shouldn't this be handled still? ⌚ |
@@ -166,6 +166,7 @@ public void ApplyShowPreviewSetting(bool show) | |||
UserSettings settings, | |||
Configuration.ISettings nugetSettings) | |||
{ | |||
var dependencySetting = GetDependencyBehaviorFromConfig(nugetSettings); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nugetSettings can be null here, which will throw
⌚ |
Configuration.ISettings nugetSettings) | ||
{ | ||
if (nugetSettings == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already returning null at the bottom by default, you can just add this if around the method body to make things more clear
🚀 |
|
NuGet/Home#1196
the bug is UI don't show the value of DependencyVersion in config as default.
the fix is during UI loading, it will check DependencyVersion in config, if there is a config setting there, use that as dependency Behavior value.