File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ if ($args[0] -eq "setup") {
36
36
}
37
37
}
38
38
39
-
40
39
# Empty the notifications file
41
40
Set-Content $notif_file $null
42
41
@@ -150,14 +149,13 @@ while ($true) {
150
149
if ($line -like " *,*" ) {
151
150
$title = $line.Split (" ," )[0 ]
152
151
$message = $line.Split (" ," )[1 ]
152
+ # If the title and the message are not empty, remove the line from the file and send the notification
153
153
if ($title -ne " " -and $message -ne " " ) {
154
154
$content = Get-Content $notif_file | Where-Object { $_ -ne $line }
155
155
Set-Content $notif_file $content
156
- if ($title -eq " stop" -and $message -eq " stop" ) {
157
- exit 0
158
- }
159
156
New-BurntToastNotification - Text $title , $message - AppLogo $icon - AppId $appId
160
157
}
158
+ # If the line is empty, remove it from the file
161
159
} elseif ($line -eq " " ) {
162
160
$content = Get-Content $notif_file | Where-Object { $_ -ne $line }
163
161
Set-Content $notif_file $content
You can’t perform that action at this time.
0 commit comments