From a540eca0d5fb6861f0ad168214710248672adbd7 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 5 Oct 2021 21:18:45 +0200 Subject: [PATCH] End select mode when the number of items got smaller --- .../de/danoeh/antennapod/fragment/SubscriptionFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java index b720f1167..69897d4d6 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SubscriptionFragment.java @@ -303,6 +303,10 @@ public class SubscriptionFragment extends Fragment .observeOn(AndroidSchedulers.mainThread()) .subscribe( result -> { + if (listItems != null && listItems.size() > result.size()) { + // We have fewer items. This can result in items being selected that are no longer visible. + subscriptionAdapter.endSelectMode(); + } listItems = result; subscriptionAdapter.setItems(result); subscriptionAdapter.notifyDataSetChanged();