Browse Source

Use async void for update dialog showing

pull/165/head
Ionite 1 year ago
parent
commit
2ca5443391
No known key found for this signature in database
  1. 5
      StabilityMatrix.Avalonia/Views/MainWindow.axaml.cs

5
StabilityMatrix.Avalonia/Views/MainWindow.axaml.cs

@ -321,14 +321,15 @@ public partial class MainWindow : AppWindowBase
progressFlyout = flyout;
}
private void FooterUpdateItem_OnTapped(object? sender, TappedEventArgs e)
private async void FooterUpdateItem_OnTapped(object? sender, TappedEventArgs e)
{
// show update window thing
if (DataContext is not MainWindowViewModel vm)
{
throw new NullReferenceException("DataContext is not MainWindowViewModel");
}
Dispatcher.UIThread.InvokeAsync(vm.ShowUpdateDialog).SafeFireAndForget();
await vm.ShowUpdateDialog();
}
private void FooterDiscordItem_OnTapped(object? sender, TappedEventArgs e)

Loading…
Cancel
Save