зеркало из https://github.com/mozilla/gecko-dev.git
Bug 627612: Search results for add-ons do not have the same order as returned by the AMO API. r=Unfocused
This commit is contained in:
Родитель
169e3209e1
Коммит
367da5bae1
|
@ -1948,11 +1948,11 @@ var gSearchView = {
|
|||
var elements = [];
|
||||
|
||||
function createSearchResults(aObjsList, aIsInstall, aIsRemote) {
|
||||
aObjsList.forEach(function(aObj) {
|
||||
let score = 0;
|
||||
if (aQuery.length > 0) {
|
||||
aObjsList.forEach(function(aObj, aIndex) {
|
||||
let score = aObjsList.length - aIndex;
|
||||
if (!aIsRemote && aQuery.length > 0) {
|
||||
score = self.getMatchScore(aObj, aQuery);
|
||||
if (score == 0 && !aIsRemote)
|
||||
if (score == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -212,8 +212,8 @@ function get_expected_results(aSortBy, aLocalExpected) {
|
|||
var expectedOrder = null, unknownOrder = null;
|
||||
switch (aSortBy) {
|
||||
case "relevancescore":
|
||||
expectedOrder = [ "remote4" , "addon2", "remote1" , "remote2",
|
||||
"install2", "addon1", "install1", "remote3" ];
|
||||
expectedOrder = [ "addon2" , "remote1", "install2", "addon1",
|
||||
"install1", "remote2", "remote3" , "remote4" ];
|
||||
unknownOrder = [];
|
||||
break;
|
||||
case "name":
|
||||
|
|
Загрузка…
Ссылка в новой задаче