diff --git a/src/views/appstore.html b/src/views/appstore.html index 3947a4417..1a1397805 100644 --- a/src/views/appstore.html +++ b/src/views/appstore.html @@ -305,7 +305,7 @@
-
+
Unstable
diff --git a/src/views/appstore.js b/src/views/appstore.js index d4011fbfb..83afc928b 100644 --- a/src/views/appstore.js +++ b/src/views/appstore.js @@ -455,17 +455,17 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca if (error) return $timeout($scope.showCategory.bind(null, category), 1000); if (!$scope.category) { - $scope.apps = apps; + $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; }); + $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') { $scope.apps = filterForRecentlyUpdatedApps(apps); } else { $scope.apps = apps.filter(function (app) { - return app.manifest.tags.some(function (tag) { return $scope.category === tag; }); - }); + return app.manifest.tags.some(function (tag) { return $scope.category === tag; }); // reverse sort; + }).sort(function (a1, a2) { return a2.ranking - a1.ranking; }); } // ensure we scroll to top