-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloader: Deleter: Dismiss previous Snackbars #5671
Conversation
@kapodamy what do you think? |
The idea would be fine if there were some system similar to a trashcan. Since we do not, I think this could cause accidental deletes. See #5419 @kcpatricio since you representing the other opinion, what's your take on this. On a sidenote, since you titled it WIP you can convert it to a draft PR |
I don't remember whether converting to draft disallows inline reviews. But I've changed it. |
As for accidental deletes: The idea is that if a user deletes one file and then proceeds to delete another file, he must be pretty sure about the first one. It takes two taps to delete the next file, which no sane person would do if they noticed they accidentally deleted the wrong file. |
Yes, a trashcan would be the safest option Clearing the download's history is a way to prevent accidental deletes since the 'delete downloaded files' only removes those that still are in history. That way you'll have to browse to NewPipe's folder with another app to access your files |
You might be conflating this PR with #5419. This PR explicitly does not address clearing all downloads. If you've cleared all downloads (deliberately or by accident), there is no possibility of triggering the codepath in this PR (no more downloads to click). |
I've added two screencasts for people to better understand the issue, see the original post at the top. |
Here's mine |
Again, this has nothing to do with the The codepath for that action, which hard-deletes or "forgets" (files still present in filesystem) all downloads, lies here: NewPipe/app/src/main/java/us/shandian/giga/ui/fragment/MissionsFragment.java Lines 190 to 199 in d6855a6
NewPipe/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java Lines 599 to 623 in d6855a6
|
@ix5 llooks good, now it's easier to delete multiple files |
679bc75
to
2aeccc0
Compare
I haven't found a better or more elegant way to do this, and it seems no one else has tackled this issue so far either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, this will be merged in next release.
@Stypox any news? |
@Stypox would you mind merging this if you have no further objections? |
Bug: In Downloader view, while deleting items, Snackbars at the bottom of the UI keep queuing up. You need to wait for all of them to dismiss themselves for files to actually be deleted. If you close NewPipe before all snackbars are dismissed, your files will not be deleted and show up again next time you start NewPipe. Fix: When running append(), trigger the commit() action immediately and cancel all delayed callbacks for commit(). This prevents Snackbars from stacking up in reverse order. Fixes: #5660
What is it?
Description of the changes in your PR
When running
append()
, trigger thecommit()
action immediately and cancel all delayed callbacks forcommit()
.Snackbars no longer pile up. For previous behaviour, see #5660
(Checking if there are any tasks running via hasCallbacks() would be nice, but that method is only available in API 29+.)
For a visual comparison:
The current behaviour in NewPipe 0.20.10
Screencast (note: Snackbars keep piling up)
With this PR applied:
Screencast (note: No piling up, but users can still undo actions)
Fixes the following issue(s)
#5660
APK testing
My server
Generated from GitHub CI
Due diligence