Skip to content

Commit cf0e86b

Browse files
ploumOctopusET
authored andcommitted
Fix grimshot trying to send notification even when disabled
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
1 parent 97c4970 commit cf0e86b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

grimshot/grimshot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ notifyOk() {
123123
notify_disabled='[ "$NOTIFY" = "no" ]'
124124
action_involves_saving='[ "$ACTION" = "save" ] || [ "$ACTION" = "savecopy" ]'
125125

126-
when "$notify_disabled" "return"
126+
if eval $notify_disabled; then
127+
return
128+
fi
127129

128130
TITLE=${2:-"Screenshot"}
129131
MESSAGE=${1:-"OK"}

0 commit comments

Comments
 (0)