소스 검색

Move swkbd message null check into constructor (#4671)

MutantAura 3 년 전
부모
커밋
4c3f09644a
1개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 3 5
      Ryujinx.Ava/UI/Applet/SwkbdAppletDialog.axaml.cs

+ 3 - 5
Ryujinx.Ava/UI/Applet/SwkbdAppletDialog.axaml.cs

@@ -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)
-            {
-                Message = args.InitialText ?? ""
-            };
+            SwkbdAppletDialog content = new SwkbdAppletDialog(args.HeaderText, args.SubtitleText, args.GuideText, args.InitialText);
 
 
             string input = string.Empty;
             string input = string.Empty;