Skip to content

Commit

Permalink
Attempt #2
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Dec 7, 2024
1 parent 4ffb8ae commit 315a181
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Ryujinx.UI.Common/App/ApplicationLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,12 @@ public int AutoLoadTitleUpdates(List<string> appDirs, out int numUpdatesRemoved)

private bool AddAndAutoSelectUpdate(TitleUpdateModel update)
{
if (update == null) return false;

var currentlySelected = TitleUpdates.Items.FindFirst(it =>
it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected);

var shouldSelect = currentlySelected.Check(curr => curr.TitleUpdate.Version < update.Version);
var shouldSelect = currentlySelected.Check(curr => curr.TitleUpdate?.Version < update.Version);

_titleUpdates.AddOrUpdate((update, shouldSelect));

Expand Down Expand Up @@ -1485,7 +1487,7 @@ private bool LoadTitleUpdatesForApplication(ApplicationData application)
if (!savedUpdateLookup.Contains(update))
{
bool shouldSelect = false;
if (selectedUpdate.Check(su => su.Update.Version < update.Version))
if (selectedUpdate.Check(su => su.Update?.Version < update.Version))
{
shouldSelect = true;
_titleUpdates.AddOrUpdate((selectedUpdate.Value.Update, false));
Expand Down

0 comments on commit 315a181

Please sign in to comment.