mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-26 07:39:52 -06:00
AutoLoad DLC/updates (#12)
* Add hooks to ApplicationLibrary for loading DLC/updates * Trigger DLC/update load on games refresh * Initial moving of DLC/updates to UI.Common * Use new models in ApplicationLibrary * Make dlc/updates records; use ApplicationLibrary for loading logic * Fix a bug with DLC window; rework some logic * Auto-load bundled DLC on startup * Autoload DLC * Add setting for autoloading dlc/updates * Remove dead code; bind to AppLibrary apps directly in mainwindow * Stub out bulk dlc menu item * Add localization; stub out bulk load updates * Set autoload dirs explicitly * Begin extracting updates to match DLC refactors * Add title update autoloading * Reduce size of settings sections * Better cache lookup for apps * Dont reload entire library on game version change * Remove ApplicationAdded event; always enumerate nsp when autoloading
This commit is contained in:
@ -5,11 +5,10 @@ using Avalonia.Interactivity;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.UI.App.Common;
|
||||
using Ryujinx.UI.Common.Helper;
|
||||
using Ryujinx.UI.Common.Models;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
@ -25,21 +24,21 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public TitleUpdateWindow(VirtualFileSystem virtualFileSystem, ApplicationData applicationData)
|
||||
public TitleUpdateWindow(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
DataContext = ViewModel = new TitleUpdateViewModel(virtualFileSystem, applicationData);
|
||||
DataContext = ViewModel = new TitleUpdateViewModel(applicationLibrary, applicationData);
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static async Task Show(VirtualFileSystem virtualFileSystem, ApplicationData applicationData)
|
||||
public static async Task Show(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
CloseButtonText = "",
|
||||
Content = new TitleUpdateWindow(virtualFileSystem, applicationData),
|
||||
Content = new TitleUpdateWindow(applicationLibrary, applicationData),
|
||||
Title = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.GameUpdateWindowHeading, applicationData.Name, applicationData.IdBaseString),
|
||||
};
|
||||
|
||||
@ -60,17 +59,6 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
ViewModel.Save();
|
||||
|
||||
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime al)
|
||||
{
|
||||
foreach (Window window in al.Windows)
|
||||
{
|
||||
if (window is MainWindow mainWindow)
|
||||
{
|
||||
mainWindow.LoadApplications();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((ContentDialog)Parent).Hide();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user