(topicID int64, title string)
| 368 | if msg.err != nil { |
| 369 | v.notice = "Could not load more results: " + msg.err.Error() |
| 370 | return nil, true |
| 371 | } |
| 372 | v.searchList.growPostings(msg.postings) |
| 373 | if len(msg.postings) == 0 { |
| 374 | v.searchNextPage = 0 |
| 375 | } else { |
| 376 | v.searchNextPage = msg.nextPage |
| 377 | } |
| 378 | return v.loadMoreSearchResults(), true |
| 379 | |
| 380 | case topicLoadedMsg: |
| 381 | if msg.requestID != v.activeRequestID || msg.boxID != v.currentBoxID() { |
| 382 | return nil, true |
| 383 | } |
| 384 | v.finishRequest(msg.requestID) |
| 385 | if msg.err != nil { |
| 386 | return func() tea.Msg { return errMsg{msg.err} }, true |
| 387 | } |
| 388 | v.inThread = true |
| 389 | v.topicID = msg.topicID |
| 390 | v.topicName = msg.title |
| 391 | v.entries = msg.entries |
| 392 | v.attachments = msg.attachments |
| 393 | v.attachmentCursor = 0 |
| 394 | var imageContent strings.Builder |
| 395 | var uploadCmds []tea.Cmd |
| 396 | for _, imgData := range msg.images { |
| 397 | rendered := v.vc.imageRenderer.render(imgData, nextImageID(), v.vc.width-4) |
| 398 | if rendered.content != "" { |
| 399 | imageContent.WriteString("\n\n") |
| 400 | imageContent.WriteString(rendered.content) |
| 401 | } |
no test coverage detected