summaryrefslogtreecommitdiff
path: root/internal/api/model/statuscontext.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-07-13 12:26:16 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-13 12:26:16 +0200
commitc83e96b8a740a44f565068d06c4f12eef486b7e5 (patch)
treea49ff113cb373953dfbe85e3406971a4d1a6779b /internal/api/model/statuscontext.go
parent[bugfix] Fix panic in `isStatusHomeTimelineable` (#3096) (diff)
downloadgotosocial-c83e96b8a740a44f565068d06c4f12eef486b7e5.tar.xz
[chore/frontend] Tweak threading a bit, inform about hidden replies (#3097)
* [chore/frontend] Tweak threading a bit, inform about hidden replies * whoops * round off bottom of replies col-header if no replies visible
Diffstat (limited to 'internal/api/model/statuscontext.go')
-rw-r--r--internal/api/model/statuscontext.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/internal/api/model/statuscontext.go b/internal/api/model/statuscontext.go
index 205672dc8..f2519c0a3 100644
--- a/internal/api/model/statuscontext.go
+++ b/internal/api/model/statuscontext.go
@@ -29,15 +29,16 @@ type ThreadContext struct {
}
type WebThreadContext struct {
- // Parents in the thread.
- Ancestors []*WebStatus `json:"ancestors"`
-
- // Children in the thread.
- Descendants []*WebStatus `json:"descendants"`
+ // Status around which this
+ // thread ctx was constructed.
+ Status *WebStatus
- // The status around which the ancestors
- // + descendants context was constructed.
- Status *WebStatus `json:"-"`
+ // Ordered slice of statuses
+ // for rendering in template.
+ //
+ // Includes ancestors, target
+ // status, and descendants.
+ Statuses []*WebStatus
// Total length of
// the main thread.