Don't remove feed item from screen after "toggle played", if filter setting includes "not played" (#6079)

This commit is contained in:
Erik Johnson 2022-09-22 10:05:42 -05:00 committed by GitHub
parent 2eddd27c45
commit 93bcac0a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,10 @@ public class TogglePlaybackStateSwipeAction implements SwipeAction {
@Override
public boolean willRemove(FeedItemFilter filter, FeedItem item) {
return filter.showUnplayed || filter.showPlayed || filter.showNew;
if (item.getPlayState() == FeedItem.NEW) {
return filter.showPlayed || filter.showNew;
} else {
return filter.showUnplayed || filter.showPlayed || filter.showNew;
}
}
}