mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 08:11:28 +00:00
Hiden "Media" button if attachments empty
This commit is contained in:
parent
5ec56bc8a3
commit
02cff53107
|
@ -355,9 +355,11 @@ statuses_render()
|
||||||
fi
|
fi
|
||||||
echo "$status" | jj -r content | delqse | html_to_txt_render
|
echo "$status" | jj -r content | delqse | html_to_txt_render
|
||||||
attachments=$(echo "$status" | jj -l media_attachments.#.remote_url | delq)
|
attachments=$(echo "$status" | jj -l media_attachments.#.remote_url | delq)
|
||||||
|
menuattachments=
|
||||||
if [ -n "$attachments" ]; then
|
if [ -n "$attachments" ]; then
|
||||||
echo "#EXTINF:-1, $uri" >> attachments.m3u8
|
echo "#EXTINF:-1, $uri" >> attachments.m3u8
|
||||||
echo '[Attachments:]'
|
echo '[Attachments:]'
|
||||||
|
menuattachments='\nMedia'
|
||||||
echo "$attachments" | tee -a attachments.m3u8
|
echo "$attachments" | tee -a attachments.m3u8
|
||||||
fi
|
fi
|
||||||
echo "$statuses_separator"
|
echo "$statuses_separator"
|
||||||
|
@ -365,7 +367,7 @@ statuses_render()
|
||||||
next=0
|
next=0
|
||||||
force_stop=0
|
force_stop=0
|
||||||
while [ "$next" -eq 0 ]; do
|
while [ "$next" -eq 0 ]; do
|
||||||
per_status_menu=$(echo 'Next\nMedia\nShare and favorite\nShare\nFavorite\nReply\nBack' | fzy)
|
per_status_menu=$(echo "Next$menuattachments\nShare and favorite\nShare\nFavorite\nReply\nBack" | fzy)
|
||||||
case "$per_status_menu" in
|
case "$per_status_menu" in
|
||||||
"Next") next=1; clear ;;
|
"Next") next=1; clear ;;
|
||||||
"Media")
|
"Media")
|
||||||
|
|
Loading…
Reference in a new issue