File tree 2 files changed +9
-1
lines changed
NetStalker/NetStalker/ToastNotifications
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ public enum NotificationChoice
13
13
Show ,
14
14
Block ,
15
15
Suppress ,
16
+ None
16
17
}
17
18
}
Original file line number Diff line number Diff line change @@ -86,11 +86,18 @@ private async static void Notifications_OnActivated(ToastNotificationActivatedEv
86
86
return ;
87
87
}
88
88
89
- if ( ! Enum . TryParse < NotificationChoice > ( args [ "Choice" ] , out NotificationChoice NotificationChoice ) )
89
+ if ( ! args . Contains ( "Choice" ) )
90
90
{
91
91
return ; //No choice to select then no action required e.g. body tapped
92
92
}
93
93
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
+
94
101
switch ( Enum . Parse ( typeof ( NotificationPurpose ) , args [ "Action" ] ) )
95
102
{
96
103
case NotificationPurpose . NotificationsSuppression :
You can’t perform that action at this time.
0 commit comments