[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
commit c83e96b8a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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.