diff options
author | ByteHamster <info@bytehamster.com> | 2019-10-23 22:44:44 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-10-23 22:51:21 +0200 |
commit | d8ffa6c4591102c96adf1096b211caf0db7aa168 (patch) | |
tree | f7e9c4255b17a89fa60f11ffeb13f35744a3b285 /app | |
parent | 68da2e022ddd51d069abbf7612b88f6a23d5f034 (diff) | |
download | AntennaPod-d8ffa6c4591102c96adf1096b211caf0db7aa168.zip |
Migrated playback history events to EventBus
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java index f9fca87fc..ab15c3602 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java @@ -12,6 +12,7 @@ import android.view.MenuItem; import android.view.View; import android.widget.ListView; +import de.danoeh.antennapod.core.event.PlaybackHistoryEvent; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -42,8 +43,7 @@ public class PlaybackHistoryFragment extends ListFragment { public static final String TAG = "PlaybackHistoryFragment"; - private static final int EVENTS = EventDistributor.PLAYBACK_HISTORY_UPDATE | - EventDistributor.PLAYER_STATUS_UPDATE; + private static final int EVENTS = EventDistributor.PLAYER_STATUS_UPDATE; private List<FeedItem> playbackHistory; private FeedItemlistAdapter adapter; @@ -166,6 +166,12 @@ public class PlaybackHistoryFragment extends ListFragment { } } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onHistoryUpdated(PlaybackHistoryEvent event) { + loadItems(); + getActivity().supportInvalidateOptionsMenu(); + } + private final EventDistributor.EventListener contentUpdate = new EventDistributor.EventListener() { @Override |