feat(settings): make slide-out alerts persist until dismissed
Add a persisted global App Settings switch. Off keeps the existing per-severity lifetimes (errors remain sticky); on makes every alert non-expiring and closes it when its body is clicked. The NotificationService supplies the current setting to each toast request. StickyNotificationIntegrationTests covers persistence and both request modes. 618 tests green, clean build with 0 warnings. Reference: Notification.Wpf exposes a CloseOnClick request option: https://github.com/G-Stas/Notification.Wpf
This commit is contained in:
@@ -14,6 +14,17 @@ public partial class MainViewModel
|
||||
{
|
||||
private bool _settingsDrawerOpen;
|
||||
private NotificationPosition _toastPosition = NotificationPosition.BottomRight;
|
||||
private bool _stickyAlertsUntilDismissed;
|
||||
|
||||
public bool StickyAlertsUntilDismissed
|
||||
{
|
||||
get => _stickyAlertsUntilDismissed;
|
||||
set
|
||||
{
|
||||
if (!SetProperty(ref _stickyAlertsUntilDismissed, value)) return;
|
||||
_layoutStore.SaveStickyAlertsUntilDismissed(value);
|
||||
}
|
||||
}
|
||||
|
||||
public NotificationPosition ToastPosition
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user