summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-26 21:23:18 +0200
committerJoas Schilling <coding@schilljs.com>2017-03-26 21:23:18 +0200
commit0229c16e5fe9a20bc150b2162d22df6fe236cb9e (patch)
tree90dcd7a425e31b304ebeb1f75d24d3c89e03dd68 /lib/private
parente0b040d6235e7f8f8e5869e56a9bda1bf346cafd (diff)
downloadnextcloud-server-0229c16e5fe9a20bc150b2162d22df6fe236cb9e.tar.gz
nextcloud-server-0229c16e5fe9a20bc150b2162d22df6fe236cb9e.zip
Don't use the dropdown for one item only
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/legacy/app.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index a68f8605258..68a8383afbf 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -459,7 +459,6 @@ class OC_App {
// This is private as well. It simply works, so don't ask for more details
private static function proceedNavigation($list) {
- $headerIconCount = 8;
usort($list, function($a, $b) {
if (isset($a['order']) && isset($b['order'])) {
return ($a['order'] < $b['order']) ? -1 : 1;
@@ -482,6 +481,11 @@ class OC_App {
}
unset($navEntry);
+ if (count($list) <= 8) {
+ return $list;
+ }
+
+ $headerIconCount = 7;
if($activeAppIndex > ($headerIconCount-1)) {
$active = $list[$activeAppIndex];
$lastInHeader = $list[$headerIconCount-1];
@@ -502,7 +506,6 @@ class OC_App {
}
public static function proceedAppNavigation($entries) {
- $headerIconCount = 8;
$activeAppIndex = -1;
$list = self::proceedNavigation($entries);
@@ -515,6 +518,13 @@ class OC_App {
$navEntry['active'] = false;
}
}
+
+
+ if (count($list) <= 8) {
+ return $list;
+ }
+
+ $headerIconCount = 7;
// move active item to last position
if($activeAppIndex > ($headerIconCount-1)) {
$active = $list[$activeAppIndex];