forked from GNUsocial/gnu-social
[COMPONENTS][Conversation] Removed redundant complementary information from notes replied to
This commit is contained in:
parent
22741702bf
commit
5d0b8930e1
@ -17,7 +17,7 @@
|
|||||||
<header class="feed-header">
|
<header class="feed-header">
|
||||||
{% set current_path = app.request.get('_route') %}
|
{% set current_path = app.request.get('_route') %}
|
||||||
{% if page_title is defined %}
|
{% 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>
|
<h1 class="section-title">{{ page_title | trans }}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -170,6 +170,10 @@ class Conversation extends Component
|
|||||||
*/
|
*/
|
||||||
public function onAppendCardNote(array $vars, array &$result): bool
|
public function onAppendCardNote(array $vars, array &$result): bool
|
||||||
{
|
{
|
||||||
|
if (str_contains($vars['request']->getPathInfo(), 'conversation')) {
|
||||||
|
return Event::next;
|
||||||
|
}
|
||||||
|
|
||||||
// The current Note being rendered
|
// The current Note being rendered
|
||||||
$note = $vars['note'];
|
$note = $vars['note'];
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
{% endblock note_info %}
|
{% endblock note_info %}
|
||||||
|
|
||||||
{% block note_complementary_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 }}"
|
<aside title="{{ 'Note\'s complementary information' | trans }}"
|
||||||
class="note-complementary">
|
class="note-complementary">
|
||||||
{% set actor_count = complementary_info['actors'] | length %}
|
{% set actor_count = complementary_info['actors'] | length %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user