Avalonia - Save Manager (#3476)

* Add save manager to account selector

* add fallback to app metadata for titlename if app is not in gamelist

* Allow recovering lost accounts
This commit is contained in:
Emmanuel Hansen 2022-12-02 13:16:43 +00:00 committed by GitHub
parent c25e8427aa
commit d9053bbe37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 693 additions and 43 deletions

View file

@ -1,3 +1,4 @@
using Ryujinx.Ava.Ui.Controls;
using Ryujinx.Ava.Ui.ViewModels;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Profile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
@ -7,6 +8,7 @@ namespace Ryujinx.Ava.Ui.Models
public class UserProfile : BaseModel
{
private readonly Profile _profile;
private readonly NavigationDialogHost _owner;
private byte[] _image;
private string _name;
private UserId _userId;
@ -41,9 +43,10 @@ namespace Ryujinx.Ava.Ui.Models
}
}
public UserProfile(Profile profile)
public UserProfile(Profile profile, NavigationDialogHost owner)
{
_profile = profile;
_owner = owner;
Image = profile.Image;
Name = profile.Name;
@ -57,5 +60,10 @@ namespace Ryujinx.Ava.Ui.Models
OnPropertyChanged(nameof(IsOpened));
OnPropertyChanged(nameof(Name));
}
public void Recover(UserProfile userProfile)
{
_owner.Navigate(typeof(UserEditor), (_owner, userProfile, true));
}
}
}