threadview

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	AccountId  uuid.UUID
	ParentURI  string       // URI of the parent post being viewed
	ParentPost *ThreadPost  // The parent post
	Replies    []ThreadPost // Replies to the parent
	Selected   int          // Currently selected reply index (-1 = parent selected)
	Offset     int          // Scroll offset for pagination
	Width      int
	Height     int

	LocalDomain string              // Cached local domain for mention highlighting
	ReturnView  common.SessionState // View to return to on Esc (default: HomeTimelineView)
	// contains filtered or unexported fields
}

Model represents the thread view state

func InitialModel

func InitialModel(accountId uuid.UUID, width, height int, localDomain string) Model

InitialModel creates a new thread view model

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetThread

func (m *Model) SetThread(parentURI string)

SetThread sets the thread to display

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type ThreadPost

type ThreadPost struct {
	ID         uuid.UUID
	Author     string
	Content    string
	Time       time.Time
	ObjectURI  string // ActivityPub object id (canonical URI, returns JSON)
	ObjectURL  string // ActivityPub object url (human-readable web UI link, preferred for display)
	IsLocal    bool   // Whether this is a local post
	IsParent   bool   // Whether this is the parent post
	IsDeleted  bool   // Whether this post was deleted (placeholder)
	ReplyCount int    // Number of replies to this post
	LikeCount  int    // Number of likes on this post
	BoostCount int    // Number of boosts on this post
}

ThreadPost represents a post in the thread (either parent or reply)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL