From 169126e511b3c457e656e2956fb4fdfd8d6be23b Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Fri, 11 Oct 2024 17:57:20 -0500 Subject: [PATCH] UI: Remember the last state of UseRandomUuid. --- src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs index 8f09568a6..76d8a9c61 100644 --- a/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs @@ -24,6 +24,9 @@ namespace Ryujinx.Ava.UI.ViewModels { public class AmiiboWindowViewModel : BaseModel, IDisposable { + // ReSharper disable once InconsistentNaming + private static bool _cachedUseRandomUuid; + private const string DefaultJson = "{ \"amiibo\": [] }"; private const float AmiiboImageSize = 350f; @@ -41,7 +44,7 @@ namespace Ryujinx.Ava.UI.ViewModels private int _seriesSelectedIndex; private bool _enableScanning; private bool _showAllAmiibo; - private bool _useRandomUuid; + private bool _useRandomUuid = _cachedUseRandomUuid; private string _usage; private static readonly AmiiboJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions()); @@ -82,7 +85,7 @@ namespace Ryujinx.Ava.UI.ViewModels get => _useRandomUuid; set { - _useRandomUuid = value; + _cachedUseRandomUuid = _useRandomUuid = value; OnPropertyChanged(); }