thunderbird / thunderbird/thunderbird-android
Improve mechanism to download complete message
Open
Nobody has claimed this yet.
type: architecture
- Dominant language
- Kotlin
- Stars
- 14k
- Forks
- 2.8k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 57
Description
When the user clicks the "Download complete message" button we (try to) download the message in a background thread and notify the caller via a callback.
This has a couple of drawbacks:
- when there's a network error or no connectivity there's no automatic retry, i.e. the user has to press the button again
- the callback leaks a reference to the activity (see #690)
- on orientation change the callback references the old activity, i.e. the new activity isn't notified
- there's no guarantee that a service is running, i.e. the app might be killed sooner than necessary when it is moved to the background
- we're not holding a wake lock while downloading the message, i.e. the device could go to sleep during download
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 by locating the implementation of the “Download complete message” button, its background download, and callback, then review the reference leak described in #690. The work is done when downloads address retry, activity changes, service lifetime, and wake-lock requirements without relying on the old activity callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100