search

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 7 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 {
	// contains filtered or unexported fields
}

Model is the search overlay component.

func New

func New(s *store.Store, tg *telegram.Client, th *theme.Theme) Model

New creates a new search model.

func (Model) IsVisible

func (m Model) IsVisible() bool

IsVisible returns whether the search is visible.

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

SetSize sets the component dimensions.

func (*Model) SetVisible

func (m *Model) SetVisible(visible bool)

SetVisible shows or hides the search overlay.

func (Model) Update

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

Update handles messages.

func (Model) View

func (m Model) View() string

View renders the search overlay.

type SearchResultMsg

type SearchResultMsg struct {
	ChatId    int64
	MessageId int64
}

SearchResultMsg is emitted when a search result is selected.

type Tab

type Tab int

Tab represents a search tab.

const (
	TabChats Tab = iota
	TabMessages
	TabGlobal
)

Jump to

Keyboard shortcuts

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