Removed event that is never sent

This commit is contained in:
ByteHamster 2019-10-23 22:49:04 +02:00
parent d8ffa6c459
commit 7d3b78091f
4 changed files with 4 additions and 9 deletions

View File

@ -41,8 +41,6 @@ public class CompletedDownloadsFragment extends ListFragment {
private static final String TAG = CompletedDownloadsFragment.class.getSimpleName();
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED | EventDistributor.UNREAD_ITEMS_UPDATE;
private List<FeedItem> items = new ArrayList<>();
private DownloadedEpisodesListAdapter listAdapter;
private Disposable disposable;
@ -146,7 +144,7 @@ public class CompletedDownloadsFragment extends ListFragment {
private final EventDistributor.EventListener contentUpdate = new EventDistributor.EventListener() {
@Override
public void update(EventDistributor eventDistributor, Integer arg) {
if ((arg & EVENTS) != 0) {
if ((arg & EventDistributor.UNREAD_ITEMS_UPDATE) != 0) {
loadItems();
}
}

View File

@ -76,9 +76,8 @@ public class QueueFragment extends Fragment {
public static final String TAG = "QueueFragment";
private static final int EVENTS = EventDistributor.DOWNLOAD_HANDLED |
EventDistributor.UNREAD_ITEMS_UPDATE | // sent when playback position is reset
EventDistributor.PLAYER_STATUS_UPDATE;
private static final int EVENTS = EventDistributor.UNREAD_ITEMS_UPDATE // sent when playback position is reset
| EventDistributor.PLAYER_STATUS_UPDATE;
private TextView infoBar;
private RecyclerView recyclerView;

View File

@ -148,8 +148,7 @@ public class SearchFragment extends ListFragment {
private final EventDistributor.EventListener contentUpdate = new EventDistributor.EventListener() {
@Override
public void update(EventDistributor eventDistributor, Integer arg) {
if ((arg & (EventDistributor.UNREAD_ITEMS_UPDATE
| EventDistributor.DOWNLOAD_HANDLED)) != 0) {
if ((arg & EventDistributor.UNREAD_ITEMS_UPDATE) != 0) {
search();
}
}

View File

@ -22,7 +22,6 @@ public class EventDistributor extends Observable {
public static final int FEED_LIST_UPDATE = 1;
public static final int UNREAD_ITEMS_UPDATE = 2;
public static final int DOWNLOAD_HANDLED = 64;
public static final int PLAYER_STATUS_UPDATE = 128;
private final Handler handler;