From c577951ec92795b9ddb04e22af573d2bb3f2f390 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 26 Jun 2009 18:30:28 -0400 Subject: [PATCH] Fix getMostUsedApps to avoid returning duplicate items --- js/misc/appInfo.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/misc/appInfo.js b/js/misc/appInfo.js index 61b36bdcf..67554f352 100644 --- a/js/misc/appInfo.js +++ b/js/misc/appInfo.js @@ -98,6 +98,9 @@ function getMostUsedApps(count) { let favs = getFavorites(); // Fill the list with default applications it's not full yet for (let i = 0; i < favs.length && favs.length <= count; i++) { + let appId = favs[i].appId; + if (alreadyAdded[appId]) + continue; matches.push(favs[i]); }