Skip to content

Commit

Permalink
Fix grimshot trying to send notification even when disabled
Browse files Browse the repository at this point in the history
Grimshot was trying to send notification by default, even when not
enabled.

The bug was that the check NOTIFY=no was done in the when() function.
The "enter" was thus exiting the when() function instead of the
notifyOk().

Fix was to replace the when() call by a simple if/then/fi
  • Loading branch information
ploum authored and OctopusET committed Feb 5, 2025
1 parent 97c4970 commit cf0e86b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grimshot/grimshot
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ notifyOk() {
notify_disabled='[ "$NOTIFY" = "no" ]'
action_involves_saving='[ "$ACTION" = "save" ] || [ "$ACTION" = "savecopy" ]'

when "$notify_disabled" "return"
if eval $notify_disabled; then
return
fi

TITLE=${2:-"Screenshot"}
MESSAGE=${1:-"OK"}
Expand Down

0 comments on commit cf0e86b

Please sign in to comment.