mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 01:02:25 -05:00
[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
This commit is contained in:
parent
0554550acb
commit
d10226e912
3 changed files with 10 additions and 8 deletions
|
|
@ -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 -}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue