{% if threads|length > 0 %} {% for thread in threads %} {% if loop.index >= cnt %} {% set participants = d2_other_participants(thread, user) %} {% set unread_cnt = 0 %} {% for message in thread.messages %} {% if not fos_message_is_read(message) %} {% set unread_cnt = unread_cnt + 1 %} {% endif %} {% endfor %}