Show if user follows you

This commit is contained in:
Mouse Reeve 2022-02-28 12:07:06 -08:00
parent ec93d1812a
commit 3dbbe0089c

View file

@ -26,8 +26,13 @@
<a href="{% url 'user-followers' user|username %}">{% blocktrans count counter=user.followers.count %}{{ counter }} follower{% plural %}{{ counter }} followers{% endblocktrans %}</a>, <a href="{% url 'user-followers' user|username %}">{% blocktrans count counter=user.followers.count %}{{ counter }} follower{% plural %}{{ counter }} followers{% endblocktrans %}</a>,
<a href="{% url 'user-following' user|username %}">{% blocktrans with counter=user.following.count %}{{ counter }} following{% endblocktrans %}</a> <a href="{% url 'user-following' user|username %}">{% blocktrans with counter=user.following.count %}{{ counter }} following{% endblocktrans %}</a>
{% elif request.user.is_authenticated and not user.hide_follows %} {% elif request.user.is_authenticated %}
{% if user.hide_follows %}
{% if request.user in user.following.all %}
{% trans "Follows you" %}
{% endif %}
{% else %}
{% mutuals_count user as mutuals %} {% mutuals_count user as mutuals %}
<a href="{% url 'user-followers' user|username %}"> <a href="{% url 'user-followers' user|username %}">
{% if mutuals %} {% if mutuals %}
@ -38,6 +43,7 @@
{% trans "No followers you follow" %} {% trans "No followers you follow" %}
{% endif %} {% endif %}
</a> </a>
{% endif %}
{% endif %} {% endif %}
</p> </p>