From 39e5e29ce5ff98e87c1dd824d5f06a6d2b090ae0 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 22 Jul 2024 21:19:28 +0000 Subject: fix logic and add translateable strings --- Zotlabs/Lib/ThreadItem.php | 3 ++- view/tpl/conv_item.tpl | 8 ++++---- view/tpl/conv_list.tpl | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 960cc82a9..d1206c604 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -543,7 +543,8 @@ class ThreadItem { 'moderate_approve' => t('Approve'), 'moderate_delete' => t('Delete'), 'rtl' => in_array($item['lang'], rtl_languages()), - 'reactions_allowed' => $reactions_allowed + 'reactions_allowed' => $reactions_allowed, + 'reaction_str' => [t('Add yours'), t('Remove yours')] ); $arr = array('item' => $item, 'output' => $tmp_item); diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 14ac86df7..1af6c34ba 100644 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -115,9 +115,9 @@ - {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}} + {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}} {{/if}} {{else}} - {{if $item.reactions_allowed && ($item.my_responses.$verb && $verb != 'announce')}} {{** undo announce is not yet supported **}} + {{if $item.reactions_allowed && !($verb === 'announce' && $item.my_responses.announce)}} {{** undo announce is not yet supported **}} {{/if}} {{else}}