This commit is contained in:
Paul Schneider 2026-11-21 20:40:56 +00:00
commit c745aef6d7
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
7 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ public sealed class NotificationService
public void Post(string message, StatusSeverity severity = StatusSeverity.Info, string? actionLabel = null, Action? action = null)
=> Avalonia.Threading.Dispatcher.UIThread.Post(() => Show(message, severity, actionLabel, action));
public void Show(string message, StatusSeverity severity = StatusSeverity.Info, string? actionLabel = null, Action? action = null)
private void Show(string message, StatusSeverity severity = StatusSeverity.Info, string? actionLabel = null, Action? action = null)
=> NotificationRequested?.Invoke(this, new NotificationRequest(message, severity, actionLabel, action));
public void Hide()

View file

@ -37,7 +37,7 @@ public static class ActionStatusViewModelExtensions
if (App.Current is App app && app.ServiceProvider is { } serviceProvider)
{
var notificationService = serviceProvider.GetRequiredService<NotificationService>();
notificationService.Show(normalizedMessage, severity);
notificationService.Post(normalizedMessage, severity);
}
}
}