diff --git a/lib/Controller/NavController.php b/lib/Controller/NavController.php index 41aff0c..ac766a5 100644 --- a/lib/Controller/NavController.php +++ b/lib/Controller/NavController.php @@ -93,7 +93,7 @@ class NavController extends Controller ]); } - $apps = $this->appRepository->getVisibleApps(); + $apps = $this->appRepository->getOrderedApps(); $categoriesLabels = $this->categoryRepository->getOrderedCategories(); $hiddenApps = $this->config->getAppValueArray('big-menu-hidden-apps', '[]'); $isForced = $this->config->getAppValueBool('force', '0'); @@ -178,10 +178,6 @@ class NavController extends Controller foreach ($items as $category => $value) { if (empty($items[$category]['apps'])) { unset($items[$category]); - } else { - uasort($items[$category]['apps'], function ($a, $b) { - return ($a['name'] < $b['name']) ? -1 : 1; - }); } } diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 20aa9fd..12be78a 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -159,11 +159,11 @@ class Admin implements ISettings 'force' => $this->config->getAppValue('force', '0'), 'target-blank-apps' => $this->config->getAppValueArray('target-blank-apps', '[]'), 'top-menu-apps' => $this->config->getAppValueArray('top-menu-apps', '[]'), - 'top-menu-apps-order' => $this->config->getAppValueArray('top-menu-apps-order', '[]'), + 'apps-order' => $this->config->getAppValueArray('apps-order', '[]'), + 'ordered-apps' => $this->appRepository->getOrderedApps(), 'top-side-menu-apps' => $this->config->getAppValueArray('top-side-menu-apps', '[]'), 'default-enabled' => $this->config->getAppValue('default-enabled', '1'), 'apps' => $this->appRepository->getVisibleApps(), - 'top-menu-ordered-apps' => $this->appRepository->getTopMenuOrderedApps(), 'apps-categories-custom' => $this->config->getAppValueArray('apps-categories-custom', '[]'), 'categories-order-type' => $this->config->getAppValue('categories-order-type', 'default'), 'categories-order' => $this->config->getAppValueArray('categories-order', '[]'),