From b11356a0cf8c223706b3e84857ea14171dde567e Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Tue, 19 Apr 2022 23:20:22 +0300 Subject: [PATCH] Hide share button if status private or direct --- pleroma-cli.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 1f5160a..c8656dc 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -337,6 +337,10 @@ statuses_render() dateutc=$(echo "$status" | jj created_at) reply_to_id=$(echo "$status" | jj in_reply_to_id) visibility_status=$(echo "$status" | jj visibility) + s_f_menu='\nShare and favorite\nShare' + if [ "$visibility_status" = "private" ] | [ "$visibility_status" = "direct" ]; then + s_f_menu= + fi echo "| $(date -d "$dateutc" "$format_time") $visibility_status $whoacct" echo "| <$id_status> $uri" if [ -n "$reply_to_id" ]; then @@ -367,7 +371,7 @@ statuses_render() next=0 force_stop=0 while [ "$next" -eq 0 ]; do - per_status_menu=$(echo "Next$menuattachments\nShare and favorite\nShare\nFavorite\nReply\nBack" | fzy) + per_status_menu=$(echo "Next$menuattachments"$s_f_menu"\nFavorite\nReply\nBack" | fzy) case "$per_status_menu" in "Next") next=1; clear ;; "Media")