fix followed user rendering

This commit is contained in:
ayaka 2024-12-22 04:25:54 +13:00
parent 9856b7fd47
commit ad39254ddc

View File

@ -44,7 +44,7 @@
{% if prefs.quicklist.len() > 0 %}
<p>QUICK ACCESS FEEDS</p>
{% for sub in prefs.quicklist %}
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{{ sub }}</a>
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{% if sub.starts_with("u_") -%}{%let sub = format!("u/{}", &sub[2..]) -%}{{ sub }}{% else -%}{{ sub }}{% endif -%}</a>
{% endfor %}
{% endif %}
<p>MAIN FEEDS</p>
@ -54,7 +54,7 @@
{% if prefs.subscriptions.len() > 0 %}
<p>REDDIT FEEDS</p>
{% for sub in prefs.subscriptions %}
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{{ sub }}</a>
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{% if sub.starts_with("u_") -%}{%let sub = format!("u/{}", &sub[2..]) -%}{{ sub }}{% else -%}{{ sub }}{% endif -%}</a>
{% endfor %}
{% endif %}
</div>