Bug 1402023 - Limit the 'Recent Activity' list in the Library to a maximum of 6 items. r=Gijs

MozReview-Commit-ID: AVHRKvAJjWe
This commit is contained in:
Mike de Boer
2017-09-21 18:25:41 +02:00
parent 9121fa9e3d
commit 47d7068811

View File

@@ -532,7 +532,12 @@ const PanelUI = {
return;
}
let highlights = await NewTabUtils.activityStreamLinks.getHighlights({ withFavicons: true });
let highlights = await NewTabUtils.activityStreamLinks.getHighlights({
// As per bug 1402023, hard-coded limit, until Activity Stream develops a
// richer list.
numItems: 6,
withFavicons: true
});
// If there's nothing to display, or the panel is already hidden, get out.
if (!highlights.length || viewNode.panelMultiView.getAttribute("panelopen") != "true") {
this._loadingRecentHighlights = false;