Null-conditional assignments, continued

This commit is contained in:
KeatonTheBot
2025-11-19 20:33:06 -06:00
parent e349ef72fb
commit e287c9fc85
4 changed files with 5 additions and 16 deletions
@@ -68,10 +68,8 @@ namespace Ryujinx.Ava.UI.Views.Input
if (_changeSlider != -1.0f && _changeSlider != (float)check.Value)
{
if (DataContext is ControllerInputViewModel viewModel)
{
viewModel.ParentModel.IsModified = true;
}
var viewModel = (DataContext as ControllerInputViewModel);
viewModel?.ParentModel.IsModified = true;
_changeSlider = (float)check.Value;
}
@@ -42,10 +42,7 @@ namespace Ryujinx.Ava.UI.Views.User
if (arg.NavigationMode == NavigationMode.Back)
{
if (_parent.Parent != null)
{
((ContentDialog)_parent.Parent).Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
}
((ContentDialog)_parent.Parent)?.Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
}
DataContext = ViewModel;