mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 11:03:04 +00:00
Prompt user on first launch to manage profiles
Related to #3396 Checks if system/Profiles.json exists, if it does not then prompt the user to manage user profiles.
This commit is contained in:
parent
ba9e0ca6dc
commit
46ebdcfe03
3 changed files with 24 additions and 1 deletions
|
@ -118,6 +118,13 @@ namespace Ryujinx.Ava
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if we've made any profiles yet
|
||||||
|
if (!File.Exists(Path.Combine(AppDataManager.BaseDirPath, "system", "Profiles.json")))
|
||||||
|
{
|
||||||
|
MainWindow.ShowNewUserEditPrompt = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (CommandLineState.LaunchPathArg != null)
|
if (CommandLineState.LaunchPathArg != null)
|
||||||
{
|
{
|
||||||
MainWindow.DeferLoadApplication(CommandLineState.LaunchPathArg, CommandLineState.StartFullscreenArg);
|
MainWindow.DeferLoadApplication(CommandLineState.LaunchPathArg, CommandLineState.StartFullscreenArg);
|
||||||
|
|
|
@ -54,6 +54,8 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
public SettingsWindow SettingsWindow { get; set; }
|
public SettingsWindow SettingsWindow { get; set; }
|
||||||
|
|
||||||
public static bool ShowKeyErrorOnLoad { get; set; }
|
public static bool ShowKeyErrorOnLoad { get; set; }
|
||||||
|
|
||||||
|
public static bool ShowNewUserEditPrompt { get; set; }
|
||||||
public ApplicationLibrary ApplicationLibrary { get; set; }
|
public ApplicationLibrary ApplicationLibrary { get; set; }
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
|
@ -295,6 +297,20 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
await Dispatcher.UIThread.InvokeAsync(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
await Dispatcher.UIThread.InvokeAsync(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ShowNewUserEditPrompt)
|
||||||
|
{
|
||||||
|
ShowNewUserEditPrompt = false;
|
||||||
|
|
||||||
|
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");
|
||||||
|
if (result == UserResult.Ok)
|
||||||
|
{
|
||||||
|
await ViewModel.ManageProfiles();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
||||||
{
|
{
|
||||||
await Updater.BeginParse(this, false).ContinueWith(task =>
|
await Updater.BeginParse(this, false).ContinueWith(task =>
|
||||||
|
|
Loading…
Reference in a new issue