From 683e92b525975de773fd7f64b6d2bcb6f7aa6379 Mon Sep 17 00:00:00 2001 From: opi Date: Fri, 18 Mar 2016 10:54:32 +0100 Subject: [PATCH] =?UTF-8?q?[enh]=C2=A0Use=20new=20--installed=20option=20f?= =?UTF-8?q?or=20main=20apps=20list.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/yunohost/controllers/apps.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js index 34556f73..40e17749 100644 --- a/src/js/yunohost/controllers/apps.js +++ b/src/js/yunohost/controllers/apps.js @@ -10,13 +10,8 @@ // List installed apps app.get('#/apps', function (c) { - c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8 - // Keep only installed apps - apps = []; - $.each(data['apps'], function(k, v) { - if (v['installed']) apps.push(v); - }); - + c.api('/apps?installed', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8 + apps = data['apps']; c.arraySortById(apps); c.view('app/app_list', {apps: apps}); });