nullable compatibility navbaricon converter.
MODIFY
WalletWasabi.Fluent/Converters/NavBarIconConverter.cs
WalletWasabi.Fluent/Converters/NavBarIconConverter.cs
@@ -12,9 +12,9 @@ public class NavBarIconConverter : IValueConverter
{
}
- object? IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ object? IValueConverter.Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
- if (value is string iconName)
+ if (Application.Current is { } && value is string iconName)
{
if (Application.Current.Styles.TryGetResource(iconName, out object? resource))
{
@@ -25,8 +25,8 @@ public class NavBarIconConverter : IValueConverter
return null;
}
- object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ object? IValueConverter.ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
- throw new NotImplementedException();
+ return null;
}
}

nullable compatibility navbaricon converter.