From a94e2641e64f2edc48fa40494e52dd7877b201a7 Mon Sep 17 00:00:00 2001 From: Emilian Roman Date: Mon, 8 Jul 2019 01:56:15 +0800 Subject: [PATCH] Revisit asynchronous invocation of the main install method --- src/AmaiSosu.GUI/MainWindow.xaml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AmaiSosu.GUI/MainWindow.xaml.cs b/src/AmaiSosu.GUI/MainWindow.xaml.cs index 3afa7cb..46fb6a6 100644 --- a/src/AmaiSosu.GUI/MainWindow.xaml.cs +++ b/src/AmaiSosu.GUI/MainWindow.xaml.cs @@ -36,12 +36,12 @@ public MainWindow() _main.Initialise(); } - private void Install(object sender, RoutedEventArgs e) + private async void Install(object sender, RoutedEventArgs e) { InstallButton.IsEnabled = false; InstallButton.Content = "..."; - - Task.Run(() => { _main.Install(); }).GetAwaiter().GetResult(); + + await Task.Run(() => _main.Install()); InstallButton.IsEnabled = true; InstallButton.Content = "⬛ Install OpenSauce";