[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
This commit is contained in:
tobi
2024-07-13 12:26:16 +02:00
committed by GitHub
parent bbbdf01213
commit c83e96b8a7
6 changed files with 90 additions and 102 deletions

View File

@@ -126,8 +126,17 @@ type WebStatus struct {
// display this status in the web view.
Indent int
// This status is the first status after
// the "main" thread, so it and everything
// This status is the last visible status
// in the main thread, so everything below
// can be considered "replies".
ThreadLastMain bool
// This status is the one around which
// the thread context was constructed.
ThreadContextStatus bool
// This status is the first visibile status
// after the "main" thread, so it and everything
// below it can be considered "replies".
ThreadFirstReply bool
}

View File

@@ -29,15 +29,16 @@ type ThreadContext struct {
}
type WebThreadContext struct {
// Parents in the thread.
Ancestors []*WebStatus `json:"ancestors"`
// Status around which this
// thread ctx was constructed.
Status *WebStatus
// Children in the thread.
Descendants []*WebStatus `json:"descendants"`
// 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.