Apply suggestions from code review

Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
This commit is contained in:
Isaac Marovitz 2024-07-19 12:46:27 -04:00 committed by GitHub
parent 174a3b8ce6
commit 1fb5c38fc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,7 +169,7 @@ namespace Ryujinx.Ava.UI.ViewModels
}
}
private void AddUpdate(string path, bool ignoreNotFound = false, bool select = false)
private void AddUpdate(string path, bool ignoreNotFound = false, bool selected = false)
{
if (!File.Exists(path) || TitleUpdates.Any(x => x.Path == path))
{
@ -207,7 +207,7 @@ namespace Ryujinx.Ava.UI.ViewModels
var update = new TitleUpdateModel(controlData, path);
TitleUpdates.Add(update);
if (select)
if (selected)
{
Dispatcher.UIThread.InvokeAsync(() => SelectedUpdate = update);
}
@ -251,7 +251,7 @@ namespace Ryujinx.Ava.UI.ViewModels
foreach (var file in result)
{
AddUpdate(file.Path.LocalPath, select: true);
AddUpdate(file.Path.LocalPath, selected: true);
}
SortUpdates();