Skip to content

Commit

Permalink
Merge pull request TeamNewPipe#5671 from ix5/download-deleter-snackbars
Browse files Browse the repository at this point in the history
Downloader: Deleter: Dismiss previous Snackbars
  • Loading branch information
TobiGr authored May 5, 2021
2 parents f80b1fb + 38ed07c commit d26ca19
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/main/java/us/shandian/giga/ui/common/Deleter.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ public Deleter(View v, Context c, MissionAdapter a, DownloadManager d, MissionIt
}

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);

Expand Down

0 comments on commit d26ca19

Please sign in to comment.