Move swkbd message null check into constructor (#4671)

This commit is contained in:
MutantAura 2023-04-12 20:18:40 +01:00 committed by GitHub
parent e187a8870a
commit 4c3f09644a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,10 +23,11 @@ namespace Ryujinx.Ava.UI.Controls
private ContentDialog _host; private ContentDialog _host;
public SwkbdAppletDialog(string mainText, string secondaryText, string placeholder) public SwkbdAppletDialog(string mainText, string secondaryText, string placeholder, string message)
{ {
MainText = mainText; MainText = mainText;
SecondaryText = secondaryText; SecondaryText = secondaryText;
Message = message ?? "";
DataContext = this; DataContext = this;
_placeholder = placeholder; _placeholder = placeholder;
InitializeComponent(); InitializeComponent();
@ -54,10 +55,7 @@ namespace Ryujinx.Ava.UI.Controls
UserResult result = UserResult.Cancel; UserResult result = UserResult.Cancel;
SwkbdAppletDialog content = new SwkbdAppletDialog(args.HeaderText, args.SubtitleText, args.GuideText) SwkbdAppletDialog content = new SwkbdAppletDialog(args.HeaderText, args.SubtitleText, args.GuideText, args.InitialText);
{
Message = args.InitialText ?? ""
};
string input = string.Empty; string input = string.Empty;