fix issue with hidden posts

master
Aevann 2024-01-31 20:54:38 +02:00
parent 3150a4c3ec
commit 91ccc8e590
1 changed files with 5 additions and 6 deletions

View File

@ -12,7 +12,12 @@
{% set disable_votes = request.path.startswith('/@') and v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %}
{% set post_permalinks = [] %}
{% for p in listing if can_see(v, p) %}
<div class="d-none">
{{post_permalinks.append(p.permalink)}}
</div>
<input hidden class="twoattrs" value="{{p.id}},{{p.comment_count}}">
{% set ups=p.upvotes %}
@ -249,11 +254,5 @@
<script defer src="{{'js/admin/post.js' | asset}}"></script>
{% endif %}
{% set post_permalinks = [] %}
<div class="d-none">
{% for p in listing %}
{{post_permalinks.append(p.permalink)}}
{% endfor %}
</div>
<input hidden id="post_permalinks" value="{{post_permalinks}}">
<script defer src="{{'js/post_permalinks.js' | asset}}"></script>