summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh
diff options
context:
space:
mode:
authorMartin Fietz <Martin.Fietz@gmail.com>2015-04-18 21:40:18 +0200
committerMartin Fietz <Martin.Fietz@gmail.com>2015-04-18 21:40:18 +0200
commit8c148b738e2ec12ab0bc609ce341c25f20b38d5c (patch)
tree6e5fb68c05a9b8042b07019767c2ca01ce72ab9b /app/src/main/java/de/danoeh
parent4de4d3b606cfa7f0d8c1098c9c7f386914252df9 (diff)
parent78cb1ad137263b59ed4dea510564649fb15d7fe9 (diff)
downloadAntennaPod-8c148b738e2ec12ab0bc609ce341c25f20b38d5c.zip
Merge pull request #757 from mfietz/AntennaPod/version_1.1.1
Merge v1.1.1 -> develop (v2)
Diffstat (limited to 'app/src/main/java/de/danoeh')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java5
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java
index ce9fac7a3..f57795c37 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/AllEpisodesFragment.java
@@ -221,7 +221,10 @@ public class AllEpisodesFragment extends Fragment {
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
if (itemsLoaded && !MenuItemUtils.isActivityDrawerOpen((NavDrawerActivity) getActivity())) {
- menu.findItem(R.id.mark_all_read_item).setVisible(unreadItems != null && !unreadItems.isEmpty());
+ MenuItem menuItem = menu.findItem(R.id.mark_all_read_item);
+ if (menuItem != null) {
+ menuItem.setVisible(unreadItems != null && !unreadItems.isEmpty());
+ }
}
}
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 647fe550d..8b78f96d0 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/PlaybackHistoryFragment.java
@@ -152,7 +152,10 @@ public class PlaybackHistoryFragment extends ListFragment {
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
if (itemsLoaded && !MenuItemUtils.isActivityDrawerOpen((NavDrawerActivity) getActivity())) {
- menu.findItem(R.id.clear_history_item).setVisible(playbackHistory != null && !playbackHistory.isEmpty());
+ MenuItem menuItem = menu.findItem(R.id.clear_history_item);
+ if (menuItem != null) {
+ menuItem.setVisible(playbackHistory != null && !playbackHistory.isEmpty());
+ }
}
}