Merge pull request #5671 from ix5/download-deleter-snackbars

Downloader: Deleter: Dismiss previous Snackbars
This commit is contained in:
Tobi 2021-05-05 10:46:46 +02:00 committed by GitHub
commit d26ca194b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,14 @@ public class Deleter {
}
public void append(Mission item) {
/* If a mission is removed from the list while the Snackbar for a previously
* removed item is still showing, commit the action for the previous item
* immediately. This prevents Snackbars from stacking up in reverse order.
*/
mHandler.removeCallbacks(rCommit);
commit();
mIterator.hide(item);
items.add(0, item);