Some cleanups for showing popular and section names depending on category and search

This commit is contained in:
Johannes Zellner
2021-03-18 14:28:22 +01:00
parent 050ea48e3e
commit 5d5c712f1c
3 changed files with 7 additions and 7 deletions
-4
View File
@@ -80,7 +80,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
if (category === 'new') return categoryLabel;
if (category === 'recent') return categoryLabel;
if (category === 'featured') return categoryLabel;
var tmp = $scope.categories.find(function (c) { return c.id === category; });
if (tmp) return tmp.label;
@@ -475,9 +474,6 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
if (!$scope.category) {
$scope.apps = apps.slice(0).filter(function (app) { return !app.featured; }).sort(function (a1, a2) { return a1.manifest.title.localeCompare(a2.manifest.title); });
$scope.popularApps = apps.slice(0).filter(function (app) { return app.featured; }).sort(function (a1, a2) { return a2.ranking - a1.ranking; });
// $scope.apps = apps.slice(0).sort(function (a1, a2) { return a1.manifest.title.localeCompare(a2.manifest.title); });
} else if ($scope.category === 'featured') {
$scope.apps = apps.filter(function (app) { return app.featured; }).sort(function (a1, a2) { return a2.ranking - a1.ranking; }); // reverse sort
} else if ($scope.category === 'new') {
$scope.apps = filterForNewApps(apps);
} else if ($scope.category === 'recent') {