Some cleanups for showing popular and section names depending on category and search
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user