Fix the notification menu usage when notification are doubled

For some reason, some notifications get doubled (probably cause of
a modemmonitor issue). Those doubled notifications cant be used with the
current notificationsmenu cause the two entry matches the picked text.

This make the first one to be picked.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
master
Stacy Harper 3 years ago committed by Maarten van Gompel
parent a5acd7fcd5
commit ae784d0ab0
  1. 2
      scripts/notifications/sxmo_notificationsmenu.sh

@ -28,7 +28,7 @@ notificationmenu() {
echo "$PICKEDCONTENT" | grep -q "Close Menu" && exit 1 echo "$PICKEDCONTENT" | grep -q "Close Menu" && exit 1
echo "$PICKEDCONTENT" | grep -q "Clear Notifications" && rm "$NOTIFDIR"/* && exit 1 echo "$PICKEDCONTENT" | grep -q "Clear Notifications" && rm "$NOTIFDIR"/* && exit 1
PICKEDNOTIFFILE="$(echo "$CHOICES" | tr -s ' ' | grep -F "$PICKEDCONTENT" | cut -d^ -f2 | tr -d ' ')" PICKEDNOTIFFILE="$(echo "$CHOICES" | tr -s ' ' | grep -F "$PICKEDCONTENT" | head -1 | cut -d^ -f2 | tr -d ' ')"
NOTIFACTION="$(head -n1 "$PICKEDNOTIFFILE")" NOTIFACTION="$(head -n1 "$PICKEDNOTIFFILE")"
setsid -f sh -c "$NOTIFACTION" & setsid -f sh -c "$NOTIFACTION" &
rm "$PICKEDNOTIFFILE" rm "$PICKEDNOTIFFILE"

Loading…
Cancel
Save