Skip to content

Commit

Permalink
Switch back to reloading the config synchronously.
Browse files Browse the repository at this point in the history
  • Loading branch information
fgimian committed Feb 2, 2025
1 parent dde7cf5 commit 4f0b9da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/TotalMixVC/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ public bool LoadConfig(bool running = false)
/// <summary>
/// Reloads the application configuration and updates all components accordingly.
/// </summary>
/// <returns>The task object representing the asynchronous operation.</returns>
public async Task ReloadConfigAsync()
public void ReloadConfig()
{
if (!File.Exists(s_configPath))
{
Expand Down
1 change: 0 additions & 1 deletion src/TotalMixVC/TotalMixVC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AsyncAwaitBestPractices.MVVM" Version="9.0.0" />
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="2.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
</ItemGroup>
Expand Down
7 changes: 3 additions & 4 deletions src/TotalMixVC/TrayIconMenu.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Windows;
using System.Windows.Input;
using AsyncAwaitBestPractices.MVVM;
using Microsoft.Win32;

namespace TotalMixVC;
Expand All @@ -23,11 +22,11 @@ public static class TrayIconMenu
/// <summary>
/// Gets the command which reloads the application configuration.
/// </summary>
public static IAsyncCommand ReloadConfig =>
new AsyncCommand(async () =>
public static ICommand ReloadConfig =>
new DelegateCommand(() =>
{
var app = (App)Application.Current;
await app.ReloadConfigAsync().ConfigureAwait(false);
app.ReloadConfig();
});

/// <summary>
Expand Down

0 comments on commit 4f0b9da

Please sign in to comment.