thunderbird / thunderbird/thunderbird-android
Only "hide" attachments that are referenced from a displayed part
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
Right now we use a questionable heuristic to decide whether or not to display an "attachment box" for a message part.
The right thing to do is to only hide the message parts that are referenced from the displayed text content. This requires parsing the HTML to find image references. We can probably do this in HtmlProcessor where we already have access to the parsed document.
This could also be used to get rid of the regular expression that tries to figure out whether a document references external images in order to display the "Show pictures" button.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AttachmentInfoExtractor.java at the linked heuristic and then inspect HtmlProcessor, where the parsed document is already available. Trace how displayed text references image parts and how the external-image regular expression controls the “Show pictures” button; the work is done when only referenced parts are hidden and that heuristic is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100