You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue contains only one bug. I will open one issue for every bug report I want to file.
Steps to reproduce the bug
Download multiple videos/audio files
Go to download page
Delete multiple videos quickly one after another
Actual behaviour
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.
Expected behavior
Deleting a second, third etc. file should flush the handler queue and immediately delete the previously marked-for-deletion file and dismiss its snackbar.
My idea would be to flush the queue when running append() by calling commit() directly before inserting into items and cancelling all current callbacks via removeCallbacks
Tokens in some kind of form might be required?
Hopyfully some Android wizards more familiar with this codebase can chime in. I see @TiA4f8R @Isira-Seneviratne touched this whole GigaGet-imported component last.
The text was updated successfully, but these errors were encountered:
Checklist
Steps to reproduce the bug
Actual behaviour
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.
Expected behavior
Deleting a second, third etc. file should flush the handler queue and immediately delete the previously marked-for-deletion file and dismiss its snackbar.
Screenshots/Screen recordings
See this screen recording
Logs
(This bug is not about crashes)
Device info
Now that this newbie template is filled out, let's get down to the actual issue.
Codepath:
NewPipe/app/src/main/java/us/shandian/giga/ui/adapter/MissionAdapter.java
Line 690 in 1f77e00
NewPipe/app/src/main/java/us/shandian/giga/ui/common/Deleter.java
Lines 57 to 62 in 1f77e00
NewPipe/app/src/main/java/us/shandian/giga/ui/common/Deleter.java
Lines 71 to 78 in 1f77e00
This causes
next()
to be posted with a delay of 350ms (doc: Handler.postDelayed)NewPipe/app/src/main/java/us/shandian/giga/ui/common/Deleter.java
Lines 80 to 91 in 1f77e00
A message with
commit()
as runnable is then posted to the handler queue with a timeout of 5 seconds.NewPipe/app/src/main/java/us/shandian/giga/ui/common/Deleter.java
Lines 93 to 115 in 1f77e00
Only
commit
then really hard-deletes the file.Possible solution
My idea would be to flush the queue when running
append()
by callingcommit()
directly before inserting intoitems
and cancelling all current callbacks via removeCallbacksTokens in some kind of form might be required?
Hopyfully some Android wizards more familiar with this codebase can chime in. I see @TiA4f8R @Isira-Seneviratne touched this whole GigaGet-imported component last.
The text was updated successfully, but these errors were encountered: