--- Entry rendering ---
(entries []models.Entry)
| 400 | rendered := v.vc.imageRenderer.render(imgData, nextImageID(), v.vc.width-4) |
| 401 | if rendered.content != "" { |
| 402 | imageContent.WriteString("\n\n") |
| 403 | imageContent.WriteString(rendered.content) |
| 404 | } |
| 405 | if rendered.raw != "" { |
| 406 | uploadCmds = append(uploadCmds, tea.Raw(rendered.raw)) |
| 407 | } |
| 408 | } |
| 409 | v.imageContent = imageContent.String() |
| 410 | v.rebuildTopicContent() |
| 411 | v.topicViewport.GotoTop() |
| 412 | // A thread read only in part is not marked seen by being opened: the reader has |
| 413 | // not had all of it, and seen would slide it under the Imbox's cover. The seen |
| 414 | // key is there for a thread they are done with anyway. |
| 415 | if msg.complete { |
| 416 | uploadCmds = append(uploadCmds, v.markPostingSeen(msg.boxID, msg.postingID)) |
| 417 | } |
| 418 | return tea.Batch(uploadCmds...), true |
| 419 | |
| 420 | case replyContextLoadedMsg: |
| 421 | if msg.boxID != v.currentBoxID() { |
| 422 | return nil, true |
| 423 | } |
| 424 | if cmd, ok := v.requests.settle(newRequestResult(msg.requestID, msg.err)); !ok { |
| 425 | return cmd, true |
| 426 | } |
| 427 | form := newReplyForm(msg, v.vc.styles) |
| 428 | v.openModal(form) |
| 429 | return form.init(), true |
| 430 | |
| 431 | case forwardContextLoadedMsg: |
| 432 | if msg.boxID != v.currentBoxID() { |
| 433 | return nil, true |
| 434 | } |
| 435 | if cmd, ok := v.requests.settle(newRequestResult(msg.requestID, msg.err)); !ok { |
| 436 | return cmd, true |
| 437 | } |
| 438 | form := newForwardForm(msg, v.vc.styles) |
| 439 | v.openModal(form) |
no test coverage detected