[COMPONENTS][Conversation] Removed redundant complementary information from notes replied to

This commit is contained in:
Eliseu Amaro 2022-02-08 14:43:39 +00:00
parent 22741702bf
commit 5d0b8930e1
Signed by: eliseuamaro
GPG Key ID: 96DA09D4B97BC2D5
3 changed files with 6 additions and 2 deletions

View File

@ -17,7 +17,7 @@
<header class="feed-header">
{% set current_path = app.request.get('_route') %}
{% if page_title is defined %}
{% if current_path starts with 'feed_' %}
{% if current_path starts with 'feed_' or 'conversation' in current_path %}
<h1 class="section-title">{{ page_title | trans }}</h1>
{% endif %}
{% else %}

View File

@ -170,6 +170,10 @@ class Conversation extends Component
*/
public function onAppendCardNote(array $vars, array &$result): bool
{
if (str_contains($vars['request']->getPathInfo(), 'conversation')) {
return Event::next;
}
// The current Note being rendered
$note = $vars['note'];

View File

@ -126,7 +126,7 @@
{% endblock note_info %}
{% block note_complementary_info %}
{% for complementary_info in handle_event('AppendCardNote', {'note': note }) %}
{% for complementary_info in handle_event('AppendCardNote', { 'note': note, 'request': app.request }) %}
<aside title="{{ 'Note\'s complementary information' | trans }}"
class="note-complementary">
{% set actor_count = complementary_info['actors'] | length %}