File tree Expand file tree Collapse file tree
NetStalker/NetStalker/ToastNotifications Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ public enum NotificationChoice
1313 Show ,
1414 Block ,
1515 Suppress ,
16+ None
1617 }
1718}
Original file line number Diff line number Diff line change @@ -86,11 +86,18 @@ private async static void Notifications_OnActivated(ToastNotificationActivatedEv
8686 return ;
8787 }
8888
89- if ( ! Enum . TryParse < NotificationChoice > ( args [ "Choice" ] , out NotificationChoice NotificationChoice ) )
89+ if ( ! args . Contains ( "Choice" ) )
9090 {
9191 return ; //No choice to select then no action required e.g. body tapped
9292 }
9393
94+ NotificationChoice NotificationChoice = NotificationChoice . None ;
95+
96+ if ( ! Enum . TryParse < NotificationChoice > ( args [ "Choice" ] , out NotificationChoice ) )
97+ {
98+ return ; //No valid choice, we return
99+ }
100+
94101 switch ( Enum . Parse ( typeof ( NotificationPurpose ) , args [ "Action" ] ) )
95102 {
96103 case NotificationPurpose . NotificationsSuppression :
You can’t perform that action at this time.
0 commit comments