From e83a2ae7d0c0cf7d6c0f27e6ed3af5cd4817a35f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 7 Nov 2014 01:09:20 +0400 Subject: [PATCH] remove browse_articles context menu item --- .../org/fox/ttrss/FeedCategoriesFragment.java | 13 ------------- .../main/java/org/fox/ttrss/FeedsFragment.java | 16 ++-------------- .../offline/OfflineFeedCategoriesFragment.java | 14 +------------- .../fox/ttrss/offline/OfflineFeedsFragment.java | 14 +------------- .../src/main/res/menu/category_menu.xml | 4 ++-- org.fox.ttrss/src/main/res/menu/feed_menu.xml | 4 ++-- 6 files changed, 8 insertions(+), 57 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 636b8533..431afe93 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 @@ -101,15 +101,6 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe .getMenuInfo(); switch (item.getItemId()) { - case R.id.browse_articles: - if (true) { - FeedCategory cat = getCategoryAtPosition(info.position); - if (cat != null) { - m_activity.openFeedArticles(new Feed(cat.id, cat.title, true)); - //setSelectedCategory(cat); - } - } - return true; case R.id.browse_headlines: if (true) { FeedCategory cat = getCategoryAtPosition(info.position); @@ -190,10 +181,6 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe if (cat != null) menu.setHeaderTitle(cat.title); - - if (!m_activity.isSmallScreen()) { - menu.findItem(R.id.browse_articles).setVisible(false); - } super.onCreateContextMenu(menu, v, menuInfo); 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 3f8d26af..02a82db0 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 @@ -137,14 +137,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); switch (item.getItemId()) { - case R.id.browse_articles: - if (true) { - Feed feed = getFeedAtPosition(info.position); - if (feed != null) { - m_activity.openFeedArticles(feed); - } - } - return true; case R.id.browse_headlines: if (true) { Feed feed = getFeedAtPosition(info.position); @@ -251,10 +243,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh if (feed != null) menu.setHeaderTitle(feed.title); - if (!m_activity.isSmallScreen()) { - menu.findItem(R.id.browse_articles).setVisible(false); - } - if (!feed.is_cat) { menu.findItem(R.id.browse_feeds).setVisible(false); } @@ -544,13 +532,13 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh final List feeds = new Gson().fromJson(content, listType); m_feeds.clear(); - + for (Feed f : feeds) if (f.id > -10 || m_catId != -4) // skip labels for flat feedlist for now m_feeds.add(f); sortFeeds(); - + /*if (m_feeds.size() == 0) setLoadingStatus(R.string.no_feeds_to_display, false); else */ 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 b260a47c..9f495ad6 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 @@ -50,11 +50,7 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli if (cursor != null) menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title"))); - if (!m_activity.isSmallScreen()) { - menu.findItem(R.id.browse_articles).setVisible(false); - } - - super.onCreateContextMenu(menu, v, menuInfo); + super.onCreateContextMenu(menu, v, menuInfo); } @@ -95,14 +91,6 @@ public class OfflineFeedCategoriesFragment extends Fragment implements OnItemCli .getMenuInfo(); switch (item.getItemId()) { - case R.id.browse_articles: - if (true) { - int catId = getCatIdAtPosition(info.position); - if (catId != -10000) { - m_activity.openFeedArticles(catId, true); - } - } - return true; case R.id.browse_headlines: if (true) { int catId = getCatIdAtPosition(info.position); 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 a022af80..20ffb4c7 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 @@ -63,14 +63,6 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); switch (item.getItemId()) { - case R.id.browse_articles: - if (true) { - int feedId = getFeedIdAtPosition(info.position); - if (feedId != -10000) { - m_activity.openFeedArticles(feedId, false); - } - } - return true; case R.id.browse_headlines: if (true) { int feedId = getFeedIdAtPosition(info.position); @@ -103,11 +95,7 @@ public class OfflineFeedsFragment extends Fragment implements OnItemClickListene if (cursor != null) menu.setHeaderTitle(cursor.getString(cursor.getColumnIndex("title"))); - if (!m_activity.isSmallScreen()) { - menu.findItem(R.id.browse_articles).setVisible(false); - } - - super.onCreateContextMenu(menu, v, menuInfo); + super.onCreateContextMenu(menu, v, menuInfo); } diff --git a/org.fox.ttrss/src/main/res/menu/category_menu.xml b/org.fox.ttrss/src/main/res/menu/category_menu.xml index 28216d41..f2547a6d 100644 --- a/org.fox.ttrss/src/main/res/menu/category_menu.xml +++ b/org.fox.ttrss/src/main/res/menu/category_menu.xml @@ -4,9 +4,9 @@ android:id="@+id/browse_headlines" android:title="@string/category_browse_headlines"/> - + android:title="@string/category_browse_articles"/> --> - + android:title="@string/category_browse_articles"/> -->