summaryrefslogtreecommitdiffstats
path: root/src/completionentry.h
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-07 10:44:55 +0200
committerDanilo M. <danix@danix.xyz>2026-08-07 10:44:55 +0200
commit28e6ea321d742d26fa07d3ae6f403e6bd9baacbe (patch)
tree59928353693bddda2b23812ac4d5068b4f56eb53 /src/completionentry.h
parent6935bfc99ed0df5c79867f7015ba04041e03f908 (diff)
downloadqtmaildir-28e6ea321d742d26fa07d3ae6f403e6bd9baacbe.tar.gz
qtmaildir-28e6ea321d742d26fa07d3ae6f403e6bd9baacbe.zip
fix(mime): a body part carrying a Content-Id no longer renders blank
collectParts() filed any part with a Content-Id into inlineParts and returned before the text/plain and text/html branches. Setting a Content-Id on the text/html body is legal and common in bulk-sender output, and such a message parsed with both body slots empty, so hasHtml() was false, HtmlBuilder fell through to an empty plain body, and the pane rendered nothing. Both halves of the report, the blank message and "no HTML part", came from that one ordering. A content id makes a part referenceable, not undisplayable. The two are independent. The branch now registers the part and falls through rather than returning, so the body still fills its slot. Registering first keeps a part that is both the body and a cid: target reachable under its id for any sibling referencing it. Content-Disposition is deliberately not used as the discriminator: it is absent far more often than it is correct, and a body part commonly carries none. The existing attachment check remains the only test for "not a body", and the first-one-wins isEmpty() guard still stops an inline image displacing a real body, since an image matches neither text branch. Verified against a hand-written fixture whose text/html part carries a Content-Id, asserting the body renders, the id still resolves, and the sibling image is unaffected. Load-bearing by mutation: restoring the early return fails the test. The user could not relocate the message that prompted the report, so the end-to-end path is unconfirmed. Closes item 41. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'src/completionentry.h')
0 files changed, 0 insertions, 0 deletions