From ab71b16059758b1caef31fb666bb55881ab60e35 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 19 Jun 2020 09:43:36 +0200 Subject: [PATCH] Fixed events delivering to background thread and modifying Views --- .../antennapod/fragment/CompletedDownloadsFragment.java | 4 ++-- .../java/de/danoeh/antennapod/fragment/SearchFragment.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java index 6629d74e2..13941dd2c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/CompletedDownloadsFragment.java @@ -181,12 +181,12 @@ public class CompletedDownloadsFragment extends Fragment { loadItems(); } - @Subscribe + @Subscribe(threadMode = ThreadMode.MAIN) public void onDownloadLogChanged(DownloadLogEvent event) { loadItems(); } - @Subscribe + @Subscribe(threadMode = ThreadMode.MAIN) public void onUnreadItemsChanged(UnreadItemsUpdateEvent event) { loadItems(); } diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java index 1ebf382fe..0d33c1282 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java @@ -190,7 +190,7 @@ public class SearchFragment extends Fragment { return FeedItemMenuHandler.onMenuItemClicked(this, item.getItemId(), selectedItem); } - @Subscribe + @Subscribe(threadMode = ThreadMode.MAIN) public void onUnreadItemsChanged(UnreadItemsUpdateEvent event) { search(); }