Skip to content

Commit a1c193a

Browse files
jschick04NikTilton
authored andcommitted
Removed InvokeAsync where it is not needed
1 parent 4413f8a commit a1c193a

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/EventLogExpert/Shared/Components/Filters/FilterCacheModal.razor.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,7 @@ private async Task AddFilter(string filter)
4848
IsEnabled = true
4949
}));
5050

51-
try
52-
{
53-
await InvokeAsync(Close);
54-
}
55-
catch (Exception e)
56-
{
57-
TraceLogger.Trace($"Failed to close filter cache modal: {e}", LogLevel.Error);
58-
}
51+
await Close();
5952
}
6053

6154
private async Task ExportFavorites()

src/EventLogExpert/Shared/Components/Filters/FilterGroup.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public sealed partial class FilterGroup
2828
private async Task ApplyFilters()
2929
{
3030
Dispatcher.Dispatch(new FilterPaneAction.ApplyFilterGroup(Group));
31-
await InvokeAsync(Parent.Close);
31+
await Parent.Close();
3232
}
3333

3434
private void CopyGroup()

src/EventLogExpert/Shared/Components/SettingsModal.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private async Task Load()
160160
}
161161
}
162162

163-
await InvokeAsync(StateHasChanged);
163+
StateHasChanged();
164164

165165
await Open();
166166
}

0 commit comments

Comments
 (0)