Fix review comments

This commit is contained in:
kekkon 2023-06-15 11:02:59 +02:00
parent 87d19fba43
commit ede761cc99

View file

@ -1480,12 +1480,12 @@ namespace Ryujinx.Ava.UI.ViewModels
async void Action() async void Action()
{ {
var loadSuccessful = false; bool isApplicationLoaded = false;
try try
{ {
loadSuccessful = await AppHost.LoadGuestApplication(); isApplicationLoaded = await AppHost.LoadGuestApplication();
} }
catch (HorizonResultException hex) catch (HorizonResultException ex)
{ {
// Apphost Cleanup // Apphost Cleanup
AppHost = null; AppHost = null;
@ -1493,14 +1493,13 @@ namespace Ryujinx.Ava.UI.ViewModels
await Dispatcher.UIThread.InvokeAsync(async () => await Dispatcher.UIThread.InvokeAsync(async () =>
{ {
await ContentDialogHelper.CreateErrorDialog( await ContentDialogHelper.CreateErrorDialog(string.Format(LocaleManager.Instance[LocaleKeys.DialogCorruptedGameError], ex.Message));
string.Format(LocaleManager.Instance[LocaleKeys.DialogCorruptedGameError], hex.Message));
}); });
return; return;
} }
if (!loadSuccessful) if (!isApplicationLoaded)
{ {
AppHost.DisposeContext(); AppHost.DisposeContext();
AppHost = null; AppHost = null;
@ -1610,7 +1609,10 @@ namespace Ryujinx.Ava.UI.ViewModels
SelectedIcon = null; SelectedIcon = null;
Dispatcher.UIThread.InvokeAsync(() => { Title = $"Ryujinx {Program.Version}"; }); Dispatcher.UIThread.InvokeAsync(() =>
{
Title = $"Ryujinx {Program.Version}";
});
} }
public void ToggleFullscreen() public void ToggleFullscreen()