From 552476bf2c6992a1312f9f4ee144d421f578688e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 6 Nov 2014 19:13:59 +0300 Subject: [PATCH] remove default_view_mode partially because jumping directly to article makes options only available while viewing headlines impossible to reach --- .../org/fox/ttrss/FeedCategoriesFragment.java | 15 ++------------- .../main/java/org/fox/ttrss/FeedsFragment.java | 15 ++------------- .../offline/OfflineFeedCategoriesFragment.java | 11 ++--------- .../fox/ttrss/offline/OfflineFeedsFragment.java | 8 ++------ org.fox.ttrss/src/main/res/values/arrays.xml | 4 ---- org.fox.ttrss/src/main/res/xml/preferences.xml | 8 -------- 6 files changed, 8 insertions(+), 53 deletions(-) diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java index bb64e9db..4512dfc2 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -517,19 +517,8 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe if (list != null) { FeedCategory cat = (FeedCategory)list.getItemAtPosition(position); - if (cat.id < 0) { - m_activity.onCatSelected(cat, false); - } else { - if ("ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) && - m_prefs.getBoolean("browse_cats_like_feeds", false)) { - - m_activity.openFeedArticles(new Feed(cat.id, cat.title, true)); - - } else { - m_activity.onCatSelected(cat); - } - } - + m_activity.onCatSelected(cat); + m_selectedCat = cat; m_adapter.notifyDataSetChanged(); diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 2a0a2126..8174bb2f 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -392,20 +392,9 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh Feed feed = (Feed)list.getItemAtPosition(position); if (feed.is_cat) { - if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) && - m_prefs.getBoolean("browse_cats_like_feeds", false)) { - - m_activity.openFeedArticles(feed); - - } else { - m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread)); - } + m_activity.onCatSelected(new FeedCategory(feed.id, feed.title, feed.unread)); } else { - if ("ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) { - m_activity.openFeedArticles(feed); - } else { - m_activity.onFeedSelected(feed); - } + m_activity.onFeedSelected(feed); } m_selectedFeed = feed; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java index 0a840736..b260a47c 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedCategoriesFragment.java @@ -208,15 +208,8 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli if (cursor != null) { int feedId = (int) cursor.getLong(0); Log.d(TAG, "clicked on feed " + feedId); - - if (m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES")) && - m_prefs.getBoolean("browse_cats_like_feeds", false)) { - - m_activity.openFeedArticles(feedId, true); - - } else { - m_activity.onCatSelected(feedId); - } + + m_activity.onCatSelected(feedId); m_selectedCatId = feedId; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java index cb456319..9ac6f26a 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineFeedsFragment.java @@ -226,12 +226,8 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene int feedId = (int) cursor.getLong(0); Log.d(TAG, "clicked on feed " + feedId); - if (!m_activity.isSmallScreen() && "ARTICLES".equals(m_prefs.getString("default_view_mode", "HEADLINES"))) { - m_activity.openFeedArticles(feedId, false); - } else { - m_activity.onFeedSelected(feedId); - } - + m_activity.onFeedSelected(feedId); + m_selectedFeedId = feedId; m_adapter.notifyDataSetChanged(); diff --git a/org.fox.ttrss/src/main/res/values/arrays.xml b/org.fox.ttrss/src/main/res/values/arrays.xml index b1ab9730..abfc18d5 100644 --- a/org.fox.ttrss/src/main/res/values/arrays.xml +++ b/org.fox.ttrss/src/main/res/values/arrays.xml @@ -13,10 +13,6 @@ @string/category_browse_headlines @string/category_browse_articles - - HEADLINES - ARTICLES - 150 250 diff --git a/org.fox.ttrss/src/main/res/xml/preferences.xml b/org.fox.ttrss/src/main/res/xml/preferences.xml index ec1c6418..1caa2f2e 100644 --- a/org.fox.ttrss/src/main/res/xml/preferences.xml +++ b/org.fox.ttrss/src/main/res/xml/preferences.xml @@ -79,14 +79,6 @@ android:summary="@string/browse_cats_like_feeds_summary" android:title="@string/browse_cats_like_feeds" /> - -