Show post count even when other counts are hidden

pull/497/head
okpierre 2023-02-04 13:55:48 -05:00 zatwierdzone przez GitHub
rodzic 4eada68d9f
commit 94271b34ac
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -66,13 +66,13 @@
</div>
{% endif %}
{% if identity.local and identity.config_identity.visible_follows %}
<div class="view-options follows">
<a href="{{ identity.urls.view }}" {% if not follows_page %}class="selected"{% endif %}><strong>{{ post_count }}</strong> posts</a>
<a href="{{ identity.urls.following }}" {% if not inbound and follows_page %}class="selected"{% endif %}><strong>{{ following_count }}</strong> following</a>
<a href="{{ identity.urls.followers }}" {% if inbound and follows_page %}class="selected"{% endif %}><strong>{{ followers_count }}</strong> follower{{ followers_count|pluralize }}</a>
</div>
{% endif %}
<div class="view-options follows">
<a href="{{ identity.urls.view }}" {% if not follows_page %}class="selected"{% endif %}><strong>{{ post_count }}</strong> posts</a>
{% if identity.local and identity.config_identity.visible_follows %}
<a href="{{ identity.urls.following }}" {% if not inbound and follows_page %}class="selected"{% endif %}><strong>{{ following_count }}</strong> following</a>
<a href="{{ identity.urls.followers }}" {% if inbound and follows_page %}class="selected"{% endif %}><strong>{{ followers_count }}</strong> follower{{ followers_count|pluralize }}</a>
{% endif %}
</div>
{% if not identity.local %}
{% if identity.outdated and not identity.name %}

Wyświetl plik

@ -23,7 +23,7 @@ def test_visible_follows_disabled(client, identity):
"""
Config.set_identity(identity, "visible_follows", True)
response = client.get(identity.urls.view)
assertContains(response, '<div class="view-options follows">', status_code=200)
assertContains(response, 'follower', status_code=200)
Config.set_identity(identity, "visible_follows", False)
response = client.get(identity.urls.view)
assertNotContains(response, '<div class="view-options follows">', status_code=200)
assertNotContains(response, 'follower', status_code=200)