Browse Source

Add notifications for package install

pull/438/head
Ionite 10 months ago
parent
commit
6d8fb3258f
No known key found for this signature in database
  1. 14
      StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageInstallDetailViewModel.cs

14
StabilityMatrix.Avalonia/ViewModels/PackageManager/PackageInstallDetailViewModel.cs

@ -202,7 +202,19 @@ public partial class PackageInstallDetailViewModel(
addInstalledPackageStep addInstalledPackageStep
}; };
var runner = new PackageModificationRunner { ShowDialogOnStart = true }; var packageName = SelectedPackage.Name;
var runner = new PackageModificationRunner
{
ModificationCompleteMessage = $"Installed {packageName}",
ModificationFailedMessage = $"Could not install {packageName}",
ShowDialogOnStart = true
};
runner.Completed += (_, completedRunner) =>
{
notificationService.OnPackageInstallCompleted(completedRunner);
};
EventManager.Instance.OnPackageInstallProgressAdded(runner); EventManager.Instance.OnPackageInstallProgressAdded(runner);
await runner.ExecuteSteps(steps.ToList()); await runner.ExecuteSteps(steps.ToList());

Loading…
Cancel
Save