mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 01:05:47 +00:00
Attempt #2
This commit is contained in:
parent
44fcb4f5cd
commit
4f9cf2be6b
1 changed files with 4 additions and 2 deletions
|
@ -1079,10 +1079,12 @@ namespace Ryujinx.UI.App.Common
|
||||||
|
|
||||||
private bool AddAndAutoSelectUpdate(TitleUpdateModel update)
|
private bool AddAndAutoSelectUpdate(TitleUpdateModel update)
|
||||||
{
|
{
|
||||||
|
if (update == null) return false;
|
||||||
|
|
||||||
var currentlySelected = TitleUpdates.Items.FindFirst(it =>
|
var currentlySelected = TitleUpdates.Items.FindFirst(it =>
|
||||||
it.TitleUpdate.TitleIdBase == update.TitleIdBase && it.IsSelected);
|
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));
|
_titleUpdates.AddOrUpdate((update, shouldSelect));
|
||||||
|
|
||||||
|
@ -1485,7 +1487,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
if (!savedUpdateLookup.Contains(update))
|
if (!savedUpdateLookup.Contains(update))
|
||||||
{
|
{
|
||||||
bool shouldSelect = false;
|
bool shouldSelect = false;
|
||||||
if (selectedUpdate.Check(su => su.Update.Version < update.Version))
|
if (selectedUpdate.Check(su => su.Update?.Version < update.Version))
|
||||||
{
|
{
|
||||||
shouldSelect = true;
|
shouldSelect = true;
|
||||||
_titleUpdates.AddOrUpdate((selectedUpdate.Value.Update, false));
|
_titleUpdates.AddOrUpdate((selectedUpdate.Value.Update, false));
|
||||||
|
|
Loading…
Reference in a new issue