aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Models/UserProfile.cs
diff options
context:
space:
mode:
authorEmmanuel Hansen <emmausssss@gmail.com>2022-12-02 13:16:43 +0000
committerGitHub <noreply@github.com>2022-12-02 13:16:43 +0000
commitd9053bbe3745846dd758561e24dd060d76b3ad9d (patch)
tree3f37cfc7b2b074205da6f2ec89b52e3508c34c11 /Ryujinx.Ava/Ui/Models/UserProfile.cs
parentc25e8427aa40a4ae920496220fd1e1621eff178b (diff)
Avalonia - Save Manager (#3476)1.1.413
* Add save manager to account selector * add fallback to app metadata for titlename if app is not in gamelist * Allow recovering lost accounts
Diffstat (limited to 'Ryujinx.Ava/Ui/Models/UserProfile.cs')
-rw-r--r--Ryujinx.Ava/Ui/Models/UserProfile.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Ryujinx.Ava/Ui/Models/UserProfile.cs b/Ryujinx.Ava/Ui/Models/UserProfile.cs
index 351ada76..c0ea9451 100644
--- a/Ryujinx.Ava/Ui/Models/UserProfile.cs
+++ b/Ryujinx.Ava/Ui/Models/UserProfile.cs
@@ -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));
+ }
}
} \ No newline at end of file