From e380bf22cb65adefe772abc61242630c7404313a Mon Sep 17 00:00:00 2001 From: LangLangbart <92653266+LangLangBart@users.noreply.github.com> Date: Fri, 19 Apr 2024 01:01:06 +0200 Subject: [PATCH] chore: Move 'marching ants' progress indicator after 'get_notifs' call --- gh-notify | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gh-notify b/gh-notify index f6011c9..7ccad21 100755 --- a/gh-notify +++ b/gh-notify @@ -245,10 +245,10 @@ print_notifs() { while :; do local_page_size=$((total_requested - fetched_count > GH_NOTIFY_PER_PAGE_LIMIT ? \ GH_NOTIFY_PER_PAGE_LIMIT : total_requested - fetched_count)) - # "marching ants" because sometimes this takes a bit. - printf >&2 "." page=$(get_notifs "$page_num") || die "Failed to get notifications." [[ -z $page ]] && break + # Print "marching ants" after `get_notifs` to indicate progress. + printf >&2 "." page_num=$((page_num + 1)) # On each run, we can fetch up to 50 notifications. If a user requested 56, we can't specify