{{define "components/thread-replies.html"}}
{{range .Descendants}}
{{template "components/status.html" dict "Status" .Status "Account" $.Account "CSRFToken" $.CSRFToken}}
{{end}} {{if and .Fetching (not .Descendants)}}
{{T "thread.fetching"}}
{{end}}
{{end}} {{/* thread-poll.html is returned by the /partial/thread/{id} polling endpoint. It swaps the replies container (primary target) and refreshes the ancestors container out-of-band, so a thread opened cold by URL fills in both directions as the background crawl imports statuses. */}} {{define "components/thread-poll.html"}}
{{range $i, $a := .Ancestors}}
{{template "components/status.html" dict "Status" $a "Account" $.Account "CSRFToken" $.CSRFToken}}
{{end}}
{{template "components/thread-replies.html" dict "StatusID" .StatusID "Descendants" .Descendants "AncestorCount" (len .Ancestors) "Account" .Account "CSRFToken" .CSRFToken "Fetching" .Fetching "PollTries" .PollTries}} {{end}}