diff options
Diffstat (limited to 'org.fox.ttrss/src')
3 files changed, 13 insertions, 1 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 7dcdc44e..a4ad4f11 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedCategoriesFragment.java @@ -8,6 +8,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; +import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.LoaderManager; @@ -304,6 +305,10 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt if (cat != null) menu.setHeaderTitle(cat.title); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + menu.findItem(R.id.create_shortcut).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 b501b374..90617e9a 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -9,6 +9,7 @@ import android.content.DialogInterface; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.graphics.Typeface; +import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.LoaderManager; @@ -373,6 +374,10 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi menu.findItem(R.id.unsubscribe_feed).setVisible(false); } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + menu.findItem(R.id.create_shortcut).setVisible(false); + } + super.onCreateContextMenu(menu, v, menuInfo); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java index 010949d3..d7e71c40 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/MasterActivity.java @@ -547,6 +547,7 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList } } + // TODO: remove; not supported on oreo public void createFeedShortcut(Feed feed) { final Intent shortcutIntent = new Intent(this, MasterActivity.class); shortcutIntent.putExtra("feed_id", feed.id); @@ -565,7 +566,8 @@ public class MasterActivity extends OnlineActivity implements HeadlinesEventList toast(R.string.shortcut_has_been_placed_on_the_home_screen); } - + + // TODO: remove; not supported on oreo public void createCategoryShortcut(FeedCategory cat) { createFeedShortcut(new Feed(cat.id, cat.title, true)); } |