diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java index b5d74777e..bd8dbff32 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java @@ -25,6 +25,7 @@ import java.util.Objects; import mozilla.components.concept.storage.VisitInfo; +import mozilla.components.concept.storage.VisitType; public class HistoryAdapter extends RecyclerView.Adapter { @@ -100,7 +101,14 @@ public void removeItem(VisitInfo historyItem) { } public int itemCount() { - return mHistoryList != null ? mHistoryList.size() : 0; + if (mHistoryList != null) { + return mHistoryList.stream().allMatch(item -> + item.getVisitType() == VisitType.NOT_A_VISIT) ? + 0 : + mHistoryList.size(); + } + + return 0; } public int getItemPosition(long id) {