sectionView is the interface every top-level section must implement.
| 19 | |
| 20 | type viewContext struct { |
| 21 | rootSDK *hey.Client |
| 22 | sdk *hey.Client |
| 23 | ctx context.Context |
| 24 | styles styles |
| 25 | imageRenderer imageRenderer |
| 26 | imageFetcher imageFetcher |
| 27 | saveAttachment attachmentSaveFunc |
| 28 | openAttachment attachmentOpenFunc |
| 29 | newAttachmentTempDir func() (string, error) |
| 30 | loadCover coverLoadFunc |
| 31 | saveCover coverSaveFunc |
| 32 | width int |
| 33 | height int // content area height |
| 34 | } |
| 35 | |
| 36 | // sectionView is the interface every top-level section must implement. |
| 37 | type sectionView interface { |
| 38 | // Init returns the command to run when this section becomes active. |
| 39 | Init() tea.Cmd |
| 40 | |
| 41 | // Update handles messages relevant to this section. |
| 42 | // Returns the command and whether the message was consumed. |
| 43 | Update(msg tea.Msg) (tea.Cmd, bool) |
| 44 | |
| 45 | // View renders the content area. |
| 46 | View() string |
| 47 | |
| 48 | // HelpBindings returns section-specific help bindings for rowContent. |
| 49 | HelpBindings() []helpBinding |
| 50 | |
| 51 | // SubnavItems returns the subnav state for header rendering. |
| 52 | SubnavItems() (items []navItem, selected int, label string, centered bool) |
| 53 | |
| 54 | // SubnavLeft / SubnavRight handle subnav row navigation. |
| 55 | SubnavLeft() tea.Cmd |
| 56 | SubnavRight() tea.Cmd |
| 57 | |
| 58 | // HandleContentKey handles key presses when focus is on rowContent. |
| 59 | HandleContentKey(msg tea.KeyPressMsg) tea.Cmd |
no outgoing calls
no test coverage detected