[Downloads v2] Refactor DownloadEstimator
Categories
(Firefox for Android :: Downloads, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: npoon, Assigned: npoon)
References
Details
(Whiteboard: [fxdroid] [group4])
Attachments
(1 file)
At the moment, DownloadEstimator takes totalBytes as a dependency. (sf). This means that we initialize this once per download but this makes it tricky for live downloads in the downloads screen because it's hard to find a place to initialize / store this.
We should investigate removing this dependency and instead, making the estimatedRemainingTime method take totalBytes as a parameter. Then, we can fix where we initialize DownloadEstimator for live downloads. Currently, it's in DefaultFileItemDescriptionProvider (added in Bug 1965511).
After this, we should also investigate if we can remove this dependency from DownloadJobState in AbstractFetchDownloadService. (sf). This was a temporary hack and is advised against because data classes should hold data and download estimator is not data
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Description
•