Skip to content

Commit

Permalink
fix: Adjust preview window size and mark as read behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed Mar 18, 2024
1 parent 6343cee commit 3221498
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gh-notify
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ select_notif() {
--no-multi \
--pointer="" \
--preview "view_notification {}" \
--preview-window "wrap:${preview_window_visibility}:50%:right:border-left:<65(wrap:${preview_window_visibility}:75%:down:border-top)" \
--preview-window "default:wrap:${preview_window_visibility}:60%:right:border-left" \
--print-query \
--prompt "GitHub Notifications > " \
--reverse \
Expand All @@ -426,10 +426,11 @@ select_notif() {
ctrl-x)
if grep -qE "Issue|PullRequest" <<<"$type"; then
gh issue comment "$num" --repo "$repo_full_name"
mark_individual_read "$selected_line" || die "Failed to mark the notification as read."
else
printf "Writing comments is only supported for %bIssues%b and %bPullRequests%b.\n" "$WHITE_BOLD" "$NC" "$WHITE_BOLD" "$NC"
exit 1
fi
mark_individual_read "$selected_line" || die "Failed to mark the notification as read."
;;
*)
die "Unexpected key '$expected_key'"
Expand Down

0 comments on commit 3221498

Please sign in to comment.