diff options
author | Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> | 2024-01-26 01:02:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-26 02:02:28 +0100 |
commit | 35fb409e85ef07b8e1c3a582cdc6615e6da71429 (patch) | |
tree | 1696d9498a73fe94d228a6bbf3ed06ff92f88a0c /src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs | |
parent | d7ec4308b45d4ecb8d77cdc8d98ee618944292ed (diff) |
Ava UI: Mod Manager (#4390)1.1.1136
* Let’s start again
* Read folders and such
* Remove Open Mod Folder menu items
* Fix folder opening, Selecting/deselecting
* She works
* Fix GTK
* AddMod
* Delete
* Fix duplicate entries
* Fix file check
* Avalonia 11
* Style fixes
* Final style fixes
* Might be too general
* Remove unnecessary using
* Enable new mods by default
* More cleanup
* Fix saving metadata
* Dont deseralise ModMetadata several times
* Avalonia I hate you
* Confirmation dialgoues
* Allow selecting multiple folders
* Add back secondary folder
* Search both paths
* Fix formatting
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Rename Title to Application
* Generic locale key
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Locale Updates
* GDK Feedback
* Fix
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Diffstat (limited to 'src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs')
-rw-r--r-- | src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs b/src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs index cdecae77..2cd714f4 100644 --- a/src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs +++ b/src/Ryujinx.Ava/UI/ViewModels/DownloadableContentManagerViewModel.cs @@ -39,6 +39,7 @@ namespace Ryujinx.Ava.UI.ViewModels private string _search; private readonly ulong _titleId; + private readonly IStorageProvider _storageProvider; private static readonly DownloadableContentJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions()); @@ -90,8 +91,6 @@ namespace Ryujinx.Ava.UI.ViewModels get => string.Format(LocaleManager.Instance[LocaleKeys.DlcWindowHeading], DownloadableContents.Count); } - public IStorageProvider StorageProvider; - public DownloadableContentManagerViewModel(VirtualFileSystem virtualFileSystem, ulong titleId) { _virtualFileSystem = virtualFileSystem; @@ -100,7 +99,7 @@ namespace Ryujinx.Ava.UI.ViewModels if (Application.Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { - StorageProvider = desktop.MainWindow.StorageProvider; + _storageProvider = desktop.MainWindow.StorageProvider; } _downloadableContentJsonPath = Path.Combine(AppDataManager.GamesDirPath, titleId.ToString("x16"), "dlc.json"); @@ -194,7 +193,7 @@ namespace Ryujinx.Ava.UI.ViewModels { Dispatcher.UIThread.InvokeAsync(async () => { - await ContentDialogHelper.CreateErrorDialog(string.Format(LocaleManager.Instance[LocaleKeys.DialogLoadNcaErrorMessage], ex.Message, containerPath)); + await ContentDialogHelper.CreateErrorDialog(string.Format(LocaleManager.Instance[LocaleKeys.DialogLoadFileErrorMessage], ex.Message, containerPath)); }); } @@ -203,7 +202,7 @@ namespace Ryujinx.Ava.UI.ViewModels public async void Add() { - var result = await StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions + var result = await _storageProvider.OpenFilePickerAsync(new FilePickerOpenOptions { Title = LocaleManager.Instance[LocaleKeys.SelectDlcDialogTitle], AllowMultiple = true, |