From 9ad08dc78e0cdbe2cdebf10a96c800e72d48e48b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 22 Jan 2023 14:14:58 +0300 Subject: Refactor messages service, remove 2 unneeded SQL queries --- src/main/resources/templates/views/thread.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/main/resources/templates/views') diff --git a/src/main/resources/templates/views/thread.html b/src/main/resources/templates/views/thread.html index 7aecaea4..759c47e1 100644 --- a/src/main/resources/templates/views/thread.html +++ b/src/main/resources/templates/views/thread.html @@ -102,18 +102,15 @@ {% endif %} - {% if recomm is not empty %} + {% if msg.recommendations.size() > 0 %}
{{ i18n("messages","message.recommendedBy") }} - {% for rec in recomm %} + {% for rec in msg.recommendations %} {% if rec.uri.toString() is empty %} @{{ rec.name }}{% if loop.index < (loop.length - 1) %}, {% endif %} {% else %} @{{ rec.name }}{% if loop.index < (loop.length - 1) %}, {% endif %} {% endif %} {% endfor %} - {% if msg.recommendations.size() > recomm.size() %} -  {{ i18n("messages","message.recommendedOthers", msg.recommendations.size() - recomm.size()) }} - {% endif %}
{% endif %} -- cgit v1.2.3