fix two context menu crashes
This commit is contained in:
parent
d361b0fec4
commit
786422a027
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="100"
|
||||
android:versionCode="101"
|
||||
android:versionName="0.8.0" >
|
||||
|
||||
<uses-sdk
|
||||
|
@ -145,6 +145,10 @@ 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);
|
||||
|
||||
}
|
||||
|
@ -181,8 +181,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
||||
menu.setHeaderTitle(feed.title);
|
||||
|
||||
if (!m_activity.isSmallScreen()) {
|
||||
menu.findItem(R.id.browse_headlines).setVisible(false);
|
||||
menu.findItem(R.id.browse_feeds).setVisible(false);
|
||||
menu.findItem(R.id.browse_articles).setVisible(false);
|
||||
}
|
||||
|
||||
super.onCreateContextMenu(menu, v, menuInfo);
|
||||
|
@ -46,6 +46,10 @@ 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);
|
||||
|
||||
}
|
||||
|
@ -85,6 +85,10 @@ 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);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user