From f07e8b5169cc1ef8e2c09666a5cfecd028e3b366 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 9 Nov 2016 14:26:37 +0100 Subject: [PATCH] Only load the routing when the navigation is displayed Signed-off-by: Joas Schilling --- appinfo/app.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/appinfo/app.php b/appinfo/app.php index c68eaacb7..71122404f 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -1,5 +1,4 @@ getL10N('spreed'); -$g = \OC::$server->getURLGenerator(); +\OC::$server->getNavigationManager()->add(function() { + $l = \OC::$server->getL10N('spreed'); + $g = \OC::$server->getURLGenerator(); -\OC::$server->getNavigationManager()->add( - [ + return [ 'id' => 'spreed', 'order' => 3, - 'href' => $g->linkToRoute( 'spreed.page.index' ), - 'icon' => $g->imagePath( 'spreed', 'app.svg' ), + 'href' => $g->linkToRoute('spreed.page.index'), + 'icon' => $g->imagePath('spreed', 'app.svg'), 'name' => $l->t('Calls'), - ] -); + + ]; +});