summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-02-19 13:17:14 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-19 13:17:14 +0100
commitd10226e91219d96622b3ff60a172ba7c022c5f9d (patch)
treee314cd5a14b9777a967c4c56bdf27cf8a94612aa /web
parent[bugfix] Ensure local statuses always get a threadID so they can be muted (#2... (diff)
downloadgotosocial-d10226e91219d96622b3ff60a172ba7c022c5f9d.tar.xz
[bugfix] Use ptr for instance stats entries to avoid skipping 0 values (#2666)
* [bugfix] Use ptr for instance stats entries to avoid skipping 0 values * comment explaining why stats values are pointers
Diffstat (limited to 'web')
-rw-r--r--web/template/page_header.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/template/page_header.tmpl b/web/template/page_header.tmpl
index dc727d144..5a2956883 100644
--- a/web/template/page_header.tmpl
+++ b/web/template/page_header.tmpl
@@ -26,7 +26,7 @@ Instance Logo
{{- end -}}
{{- define "strapUsers" -}}
-{{- with .instance.Stats.user_count -}}
+{{- with deref .instance.Stats.user_count -}}
{{- if eq . 1 -}}
<span class="count">{{- . -}}</span> user
{{- else -}}
@@ -36,7 +36,7 @@ Instance Logo
{{- end -}}
{{- define "strapPosts" -}}
-{{- with .instance.Stats.status_count -}}
+{{- with deref .instance.Stats.status_count -}}
{{- if eq . 1 -}}
<span class="count">{{- . -}}</span> post
{{- else -}}
@@ -46,7 +46,7 @@ Instance Logo
{{- end -}}
{{- define "strapInstances" -}}
-{{- with .instance.Stats.domain_count -}}
+{{- with deref .instance.Stats.domain_count -}}
{{- if eq . 1 -}}
<span class="count">{{- . -}}</span> other instance
{{- else -}}