Skip to content

Commit

Permalink
修复部分问题
Browse files Browse the repository at this point in the history
  • Loading branch information
natsurainko committed Sep 15, 2024
1 parent ce78c9b commit df56845
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@

<Grid Visibility="{Binding ShowException, Converter={ThemeResource BoolToVisibilityConverter}}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<TextBlock
Expand Down
24 changes: 12 additions & 12 deletions Natsurainko.FluentLauncher/ViewModels/Common/TaskViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ protected override async void Run()
{
instance = await _installer.InstallAsync(_tokenSource.Token);
}
catch (AggregateException aggregateException)
catch (Exception ex)
{
if (aggregateException.InnerException is OperationCanceledException canceledException)
if (ex.InnerException is OperationCanceledException canceledException)
{
resultState = TaskState.Cancelled;
Exception = canceledException;
Expand All @@ -379,17 +379,17 @@ protected override async void Run()
ExceptionReason = canceledException.Message;
});
}
}
catch (Exception ex)
{
resultState = TaskState.Failed;
Exception = ex;

App.DispatcherQueue.TryEnqueue(() =>
else
{
ShowException = true;
ExceptionReason = ex.Message;
});
resultState = TaskState.Failed;
Exception = ex;

App.DispatcherQueue.TryEnqueue(() =>
{
ShowException = true;
ExceptionReason = ex.Message;
});
}
}

App.DispatcherQueue.TryEnqueue(() =>
Expand Down

0 comments on commit df56845

Please sign in to comment.