Closed Bug 1957018 Opened 5 months ago Closed 4 months ago

[Downloads v2] [Refactor] Stop storing the ids of the items pending deletion in DownloadFragment

Categories

(Firefox for Android :: Downloads, task, P1)

All
Android
task

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: titouan, Assigned: titouan)

References

Details

(Whiteboard: [fxdroid][group4])

Attachments

(3 files, 1 obsolete file)

Currently, the DownloadFragment retains the items that are pending deletion, and pass them into the UndoPendingDeletionSet action that is dispatched on the DownloadStore.

We should not store this information there, and the DownloadFragment should only dispatch an UndoPendingDeletion action that would then undo the last Deletion that was triggered, if the delay has not expired yet.

Blocks: 1957027
Attachment #9475299 - Attachment description: Bug 1957018 - Part 2 - Stop storing pendingDeletionItems in the state → WIP - Bug 1957018 - Part 2 - Stop storing pendingDeletionItems in the state
Attachment #9475299 - Attachment is obsolete: true
Attachment #9475298 - Attachment description: Bug 1957018 - Part 1 - Move storing of the ids of the items pending deletion from DownloadFragment to the DownloadDeleteMiddleware. → Bug 1957018 - Move storing of the ids of the items pending deletion from DownloadFragment to the DownloadDeleteMiddleware.
Pushed by tthibaud@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9ac50df5fefa Move storing of the ids of the items pending deletion from DownloadFragment to the DownloadDeleteMiddleware. r=android-reviewers,rsainani
Flags: qe-verify+
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
Attached video 1957018 - Trim.mp4

Verified on the latest Firefox for Android 140.0a1 from 5/7 on 2 different devices: Google Pixel 6 (Android 16), and OnePlus 5 (Android 10).

After deleting some downloaded files, and tapping on "Undo", the restored files are only available for a few seconds, then they are deleted completely - please see the attached short video.

Rahul, please take a look.
Thank you!

  • when deleting a single downloaded file from its three-dot menu + "undo" the file is restored without issues. The problem is when deleting and restoring after long-tap on a downloaded file + "undo".
Flags: needinfo?(rsainani)
Attached file logs.txt
Flags: needinfo?(tthibaud)
Flags: needinfo?(rsainani)

Thanks for this testing Mira, I'll investigate!

Flags: needinfo?(tthibaud)
Flags: qe-verify+
Regressions: 1968674
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: