Update view after episode deletion when downloaded filter is enabled (#4560)
This commit is contained in:
parent
7ed1e36ac3
commit
469a1615db
|
@ -89,6 +89,18 @@ public class AllEpisodesFragment extends EpisodesListFragment {
|
|||
filterDialog.openDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldUpdatedItemRemainInList(FeedItem item) {
|
||||
SharedPreferences prefs = getActivity().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);
|
||||
FeedItemFilter feedItemFilter = new FeedItemFilter(prefs.getString(PREF_FILTER, ""));
|
||||
|
||||
if (feedItemFilter.isShowDownloaded() && (!item.hasMedia() || !item.getMedia().isDownloaded())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected List<FeedItem> loadData() {
|
||||
|
|
|
@ -129,4 +129,8 @@ public class FeedItemFilter {
|
|||
return mProperties.clone();
|
||||
}
|
||||
|
||||
public boolean isShowDownloaded() {
|
||||
return showDownloaded;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue