remove browse_articles context menu item
This commit is contained in:
parent
af2d3cfc54
commit
e83a2ae7d0
@ -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);
|
||||
|
||||
|
@ -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<Feed> 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 */
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
android:id="@+id/browse_headlines"
|
||||
android:title="@string/category_browse_headlines"/>
|
||||
|
||||
<item
|
||||
<!-- <item
|
||||
android:id="@+id/browse_articles"
|
||||
android:title="@string/category_browse_articles"/>
|
||||
android:title="@string/category_browse_articles"/> -->
|
||||
|
||||
<item
|
||||
android:id="@+id/browse_feeds"
|
||||
|
@ -4,9 +4,9 @@
|
||||
android:id="@+id/browse_headlines"
|
||||
android:title="@string/category_browse_headlines"/>
|
||||
|
||||
<item
|
||||
<!-- <item
|
||||
android:id="@+id/browse_articles"
|
||||
android:title="@string/category_browse_articles"/>
|
||||
android:title="@string/category_browse_articles"/> -->
|
||||
|
||||
<item
|
||||
android:id="@+id/browse_feeds"
|
||||
|
Loading…
Reference in New Issue
Block a user