Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ private void OnNotificationActionInvokedError(Exception obj)

private void OnNotificationActionInvoked((uint id, string actionKey) @event)
{
if (!_activeNotifications.TryGetValue(@event.id, out var notification)) return;
if (!_activeNotifications.TryGetValue(@event.id, out var notification) || notification is null) return;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the notification is removed then checking TryGetValue here is enough. It already returns false when the item is not in the dictionary.


NotificationActivated?.Invoke(this,
new NotificationActivatedEventArgs(notification, @event.actionKey));
_activeNotifications.Remove(@event.id);
}
}
}