aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Controls/UserEditor.axaml.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/Controls/UserEditor.axaml.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/Controls/UserEditor.axaml.cs')
-rw-r--r--Ryujinx.Ava/Ui/Controls/UserEditor.axaml.cs18
1 files changed, 6 insertions, 12 deletions
diff --git a/Ryujinx.Ava/Ui/Controls/UserEditor.axaml.cs b/Ryujinx.Ava/Ui/Controls/UserEditor.axaml.cs
index ea996da8..f5b51e4e 100644
--- a/Ryujinx.Ava/Ui/Controls/UserEditor.axaml.cs
+++ b/Ryujinx.Ava/Ui/Controls/UserEditor.axaml.cs
@@ -36,15 +36,8 @@ namespace Ryujinx.Ava.Ui.Controls
case NavigationMode.New:
var args = ((NavigationDialogHost parent, UserProfile profile, bool isNewUser))arg.Parameter;
_isNewUser = args.isNewUser;
- if (!_isNewUser)
- {
- _profile = args.profile;
- TempProfile = new TempProfile(_profile);
- }
- else
- {
- TempProfile = new TempProfile();
- }
+ _profile = args.profile;
+ TempProfile = new TempProfile(_profile);
_parent = args.parent;
break;
@@ -53,7 +46,8 @@ namespace Ryujinx.Ava.Ui.Controls
DataContext = TempProfile;
AddPictureButton.IsVisible = _isNewUser;
- IdLabel.IsVisible = !_isNewUser;
+ IdLabel.IsVisible = _profile != null;
+ IdText.IsVisible = _profile != null;
ChangePictureButton.IsVisible = !_isNewUser;
}
}
@@ -87,7 +81,7 @@ namespace Ryujinx.Ava.Ui.Controls
return;
}
- if (_profile != null)
+ if (_profile != null && !_isNewUser)
{
_profile.Name = TempProfile.Name;
_profile.Image = TempProfile.Image;
@@ -97,7 +91,7 @@ namespace Ryujinx.Ava.Ui.Controls
}
else if (_isNewUser)
{
- _parent.AccountManager.AddUser(TempProfile.Name, TempProfile.Image);
+ _parent.AccountManager.AddUser(TempProfile.Name, TempProfile.Image, TempProfile.UserId);
}
else
{