Index: mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java |
=================================================================== |
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java |
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/StreamRecyclerAdapter.java |
@@ -195,31 +195,36 @@ |
if (type == RowItemType.HIGHLIGHT_ITEM.getViewType()) { |
final Highlight highlight = (Highlight) recyclerViewModel.get(position); |
((WebpageItemRow) holder).bind(highlight, position, tilesSize); |
} else if (type == RowItemType.TOP_PANEL.getViewType()) { |
((TopPanelRow) holder).bind(topSitesCursor, tilesSize); |
} else if (type == RowItemType.TOP_STORIES_ITEM.getViewType()) { |
final TopStory story = (TopStory) recyclerViewModel.get(position); |
((WebpageItemRow) holder).bind(story, position, tilesSize); |
+ // We always hide top stories by Pocket |
+ // See https://issues.adblockplus.org/ticket/7199 |
+ setViewVisible(false, holder.itemView); |
} else if (type == RowItemType.HIGHLIGHTS_TITLE.getViewType() |
|| type == RowItemType.HIGHLIGHTS_EMPTY_STATE.getViewType()) { |
final Context context = holder.itemView.getContext(); |
final SharedPreferences sharedPreferences = GeckoSharedPrefs.forProfile(context); |
final boolean bookmarksEnabled = sharedPreferences.getBoolean(ActivityStreamPanel.PREF_BOOKMARKS_ENABLED, |
context.getResources().getBoolean(R.bool.pref_activitystream_recentbookmarks_enabled_default)); |
final boolean visitedEnabled = sharedPreferences.getBoolean(ActivityStreamPanel.PREF_VISITED_ENABLED, |
context.getResources().getBoolean(R.bool.pref_activitystream_visited_enabled_default)); |
setViewVisible(bookmarksEnabled || visitedEnabled, holder.itemView); |
} else if (type == RowItemType.TOP_STORIES_TITLE.getViewType()) { |
final Context context = holder.itemView.getContext(); |
final boolean pocketEnabled = ActivityStreamConfiguration.isPocketEnabledByLocale(context) && |
GeckoSharedPrefs.forProfile(context).getBoolean(ActivityStreamPanel.PREF_POCKET_ENABLED, |
context.getResources().getBoolean(R.bool.pref_activitystream_pocket_enabled_default)); |
- setViewVisible(pocketEnabled, holder.itemView); |
+ // We always hide top stories by Pocket |
+ // See https://issues.adblockplus.org/ticket/7199 |
+ setViewVisible(false, holder.itemView); |
} |
} |
/** |
* This sets a child view of the adapter visible or hidden. |
* |
* This only applies to children whose height and width are WRAP_CONTENT and MATCH_PARENT |
* respectively. |