Sfoglia il codice sorgente

misc: chore: this isn't even bound to a XAML element, why was this an async void

Evan Husted 1 anno fa
parent
commit
e8e1dc6619
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs

+ 3 - 3
src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs

@@ -264,7 +264,7 @@ namespace Ryujinx.Ava.UI.ViewModels
                     Logger.Error?.Print(LogClass.Application, $"Couldn't get valid amiibo data: {exception}");
 
                     // Neither local or remote files are valid JSON, close window.
-                    ShowInfoDialog();
+                    await ShowInfoDialog();
                     Close();
                 }
                 else if (!remoteIsValid)
@@ -273,7 +273,7 @@ namespace Ryujinx.Ava.UI.ViewModels
 
                     // Only the local file is valid, the local one should be used
                     // but the user should be warned.
-                    ShowInfoDialog();
+                    await ShowInfoDialog();
                 }
             }
 
@@ -525,7 +525,7 @@ namespace Ryujinx.Ava.UI.ViewModels
             AmiiboImage = bitmap;
         }
 
-        private static async void ShowInfoDialog()
+        private static async Task ShowInfoDialog()
         {
             await ContentDialogHelper.CreateInfoDialog(LocaleManager.Instance[LocaleKeys.DialogAmiiboApiTitle],
                 LocaleManager.Instance[LocaleKeys.DialogAmiiboApiConnectErrorMessage],