(p generated.Posting)
| 299 | liveRequestID uint64 // identifies the only live re-read allowed to update the list |
| 300 | liveRefreshDue bool // a re-read is already on its way |
| 301 | moreRequestID uint64 // identifies the only page-below read allowed to grow the list |
| 302 | searchMoreID uint64 // the same, for the search results |
| 303 | bundleMoreID uint64 // the same, for an open bundle's threads |
| 304 | seenMoreID uint64 // the same, for the Previously Seen screen |
| 305 | } |
| 306 | |
| 307 | func newMailView(vc *viewContext) *mailView { |
| 308 | view := &mailView{ |
| 309 | vc: vc, |
| 310 | topicViewport: viewport.New(viewport.WithWidth(0), viewport.WithHeight(0)), |
| 311 | searchList: contentList{hideSeenState: true}, |
| 312 | bundleList: contentList{hideSeenState: true}, |
| 313 | seenList: contentList{hideSeenState: true}, |
| 314 | } |
| 315 | if vc.loadCover != nil { |
| 316 | view.cover = parseCoverPreset(vc.loadCover()) |
| 317 | } |
| 318 | return view |
| 319 | } |
| 320 | |
| 321 | func (v *mailView) Init() tea.Cmd { |
| 322 | if len(v.boxes) == 0 { |
| 323 | return v.requestSources() |
| 324 | } |
| 325 | if v.boxIndex < len(v.boxes) { |
| 326 | return v.requestPostings(v.boxes[v.boxIndex]) |
no test coverage detected