Profiles - Avoid unnecessary OnBrokenStateChanged calls

Profiles - Fixed int range/float range deserialization
Profiles - Use Random.Shared where applicable
This commit is contained in:
RobertBeekman committed 2024-03-02 17:38:20 +01:00
1 parent 5c7497a859
commit 28640f9502
5 files changed
+14 -5

No files matched your search

@@ -162,7 +162,7 @@ public partial class ProfileConfigurationEditViewModel : DialogViewModelBase<Pro
// Preselect the icon or fall back to a random one
SelectedMaterialIcon = !IsNew && Enum.TryParse(_profileConfiguration.Icon.IconName, out MaterialIconKind enumValue)
? icons.FirstOrDefault(m => m.Icon == enumValue)
: icons.ElementAt(new Random().Next(0, icons.Count - 1));
: icons.ElementAt(Random.Shared.Next(0, icons.Count - 1));
}
private async Task SaveIcon()