misc: Code cleanup

This commit is contained in:
Evan Husted
2024-10-25 08:34:50 -05:00
parent c69904afc6
commit 281be7ca62
19 changed files with 136 additions and 156 deletions

View File

@@ -31,15 +31,11 @@ namespace Ryujinx.Ava.UI.Applet
public bool DisplayMessageDialog(ControllerAppletUIArgs args)
{
ManualResetEvent dialogCloseEvent = new(false);
bool ignoreApplet = ConfigurationState.Instance.IgnoreApplet;
bool okPressed = false;
if (ignoreApplet)
{
if (ConfigurationState.Instance.IgnoreApplet)
return false;
}
Dispatcher.UIThread.InvokeAsync(async () =>
{
@@ -74,9 +70,9 @@ namespace Ryujinx.Ava.UI.Applet
UserResult response = await ContentDialogHelper.ShowDeferredContentDialog(_parent,
title,
message,
"",
string.Empty,
LocaleManager.Instance[LocaleKeys.DialogOpenSettingsWindowLabel],
"",
string.Empty,
LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
(int)Symbol.Important,
deferEvent,
@@ -179,12 +175,12 @@ namespace Ryujinx.Ava.UI.Applet
{
Title = title,
WindowStartupLocation = WindowStartupLocation.CenterScreen,
Width = 400,
Width = 400
};
object response = await msgDialog.Run();
if (response != null && buttons != null && buttons.Length > 1 && (int)response != buttons.Length - 1)
if (response != null && buttons is { Length: > 1 } && (int)response != buttons.Length - 1)
{
showDetails = true;
}