thunderbird / thunderbird/thunderbird-android

Improve mechanism to download complete message

Open
#782 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.