fix #24: missing apps

This commit is contained in:
Simon Vieille
2020-08-19 09:18:29 +02:00
parent e7d319bbf7
commit e4f9765247
2 changed files with 10 additions and 9 deletions
+9 -8
View File
@@ -42,11 +42,14 @@ class AppRepository
foreach ($apps as $app) {
$id = $app['id'];
if (isset($navigation[$id])) {
$app['name'] = $this->l10nFactory->get($app['id'])->t($app['name']);
$app['href'] = $navigation[$id]['href'];
foreach ([$app['id'], $app['id'].'_index'] as $id) {
if (isset($navigation[$id])) {
$app['name'] = $this->l10nFactory->get($id)->t($app['name']);
$app['href'] = $navigation[$id]['href'];
$app['icon'] = $navigation[$id]['icon'];
$visibleApps[$id] = $app;
$visibleApps[$id] = $app;
}
}
}
@@ -56,8 +59,7 @@ class AppRepository
'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'],
'previewAsIcon' => true,
'icon' => $app['icon'],
'category' => [
'external_links',
],
@@ -67,8 +69,7 @@ class AppRepository
'id' => $app['id'],
'name' => $this->l10nFactory->get($app['id'])->t($app['name']),
'href' => $app['href'],
'preview' => $app['icon'],
'previewAsIcon' => true,
'icon' => $app['icon'],
'category' => [],
];
}