Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default user creation behavior #6583

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dianyaa
Copy link

@dianyaa dianyaa commented Mar 31, 2024

This resolves #3396. Changed the way that AccountManager creates the first user. Instead of creating a user if one with the DefaultUserId does not exists, it now creates a user if the profiles dictionary is empty. And when creating that user it uses a randomly generated user id instead of the fixed default. Also added a prompt on the first launch (technically if system/Profiles.json does not exist) which will ask the user if they wish to manage user profiles immediately.

Sidenote:
This is my first time contributing to an open source project, so I apologize if I have failed to follow any etiquette. In addition, I also apologize if the solution to the issue is not appropriate. I would appreciate any feedback anyone may have.

Change AccountManager to create a random id for the default user.
Change UserEditorView to not show the 'Delete' button if there is only one user present.
Related to Ryujinx#3396

Checks if system/Profiles.json exists, if it does not then prompt the
user to manage user profiles.
Current behavior opens the DefaultUserId, however with the change to use
a randomly generated ID for the first user there is not a user with that
ID. Instead we open the first user in _profiles.
@github-actions github-actions bot added horizon Related to Ryujinx.HLE gui Related to Ryujinx.Ui labels Mar 31, 2024
@ryujinx-mako ryujinx-mako bot requested review from AcK77, emmauss, gdkchan, TSRBerry and a team March 31, 2024 05:31

await Dispatcher.UIThread.InvokeAsync(async () =>
{
UserResult result = await ContentDialogHelper.CreateInfoDialog("The default profile has been created.", "Would you like to manage profiles now?", "Yes", "No", "First Launch");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this dialogue is necessary, but if we're keeping it, these strings need to be localised.

Copy link
Author

@dianyaa dianyaa Apr 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the dialog as the issue mentioned a prompt, ideally I would have wanted to display a version of the user editor right away, but I am very new to UI related things. I do agree that in its current state it is unnecessary/clunky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui Related to Ryujinx.Ui horizon Related to Ryujinx.HLE
Projects
None yet
2 participants