Optimization and Improvement

Changed callback from synchronous Action<bool, string> to asynchronous Func<bool, string, Task>
This commit is contained in:
2dust
2025-08-29 09:49:30 +08:00
parent abdafc9b3b
commit f83e83de13
3 changed files with 24 additions and 24 deletions

View File

@@ -245,7 +245,7 @@ public class MainWindowViewModel : MyReactiveObject
#region Actions
private void UpdateHandler(bool notify, string msg)
private async Task UpdateHandler(bool notify, string msg)
{
NoticeManager.Instance.SendMessage(msg);
if (notify)
@@ -631,7 +631,7 @@ public class MainWindowViewModel : MyReactiveObject
Locator.Current.GetService<StatusBarViewModel>()?.RefreshRoutingsMenu();
await ConfigHandler.SaveConfig(_config);
await new UpdateService().UpdateGeoFileAll(_config, UpdateHandler);
await new UpdateService().UpdateGeoFileAll(_config, UpdateTaskHandler);
await Reload();
}