From eef1ea935ef4d444dfe78b32594767b9068ce735 Mon Sep 17 00:00:00 2001 From: David Development Date: Tue, 31 Mar 2015 22:22:11 +0200 Subject: [PATCH] Code refactoring --- .../owncloudnewsreader/NewsReaderDetailFragment.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java index b92e90df..532b799b 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderDetailFragment.java @@ -182,13 +182,11 @@ public class NewsReaderDetailFragment extends ListFragment implements IOnStayUnr { if(MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems() != null) { - if(idFolder != null) { - if(idFolder == SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_UNREAD_ITEMS.getValue()) - MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems().setEnabled(false); - else - MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems().setEnabled(true); - } else - MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems().setEnabled(false); + if(idFolder != null && idFolder == SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_UNREAD_ITEMS.getValue()) { + MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems().setEnabled(false); + } else { + MenuUtilsFragmentActivity.getMenuItemDownloadMoreItems().setEnabled(true); + } } }