mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-16 19:22:55 +00:00
26 lines
755 B
C#
26 lines
755 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Ryujinx.Ava.Common.Models;
|
|
using Ryujinx.Ava.Systems.AppLibrary;
|
|
using System.Linq;
|
|
|
|
namespace Ryujinx.Ava.UI.ViewModels
|
|
{
|
|
public partial class DlcSelectViewModel : BaseModel
|
|
{
|
|
[ObservableProperty]
|
|
public partial DownloadableContentModel[] Dlcs { get; set; }
|
|
#nullable enable
|
|
[ObservableProperty]
|
|
public partial DownloadableContentModel? SelectedDlc { get; set; }
|
|
#nullable disable
|
|
|
|
public DlcSelectViewModel(ulong titleId, ApplicationLibrary appLibrary)
|
|
{
|
|
Dlcs = appLibrary.FindDlcsFor(titleId)
|
|
.OrderBy(it => it.IsBundled ? 0 : 1)
|
|
.ThenBy(it => it.TitleId)
|
|
.ToArray();
|
|
}
|
|
}
|
|
}
|