diff --git a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/TopPanelRow.java b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/TopPanelRow.java index 4a71238b912c..6bdbd1e29675 100644 --- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/TopPanelRow.java +++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/TopPanelRow.java @@ -122,7 +122,8 @@ public class TopPanelRow extends StreamViewHolder { final Set urls = new HashSet(limit); do { String baseUrl = getBaseForUrl(cursor.getString(cursor.getColumnIndex(BrowserContract.Combined.URL))); - if (!urls.contains(baseUrl)) { + boolean isPinned = isTopSitePinned(cursor.getInt(cursor.getColumnIndex(BrowserContract.TopSites.TYPE))); + if (isPinned || !urls.contains(baseUrl)) { final Object[] originalColumns = new Object[] { cursor.getLong(cursor.getColumnIndex(BrowserContract.Combined._ID)), cursor.getLong(cursor.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)), @@ -142,6 +143,10 @@ public class TopPanelRow extends StreamViewHolder { return filteredCursor; } + private boolean isTopSitePinned(final int topSiteType) { + return topSiteType == BrowserContract.TopSites.TYPE_PINNED; + } + private String getBaseForUrl(final String url) { try { return new URL(url).getHost();