]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #6197 from annando/hide-short-groups
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 24 Nov 2018 13:22:43 +0000 (08:22 -0500)
committerGitHub <noreply@github.com>
Sat, 24 Nov 2018 13:22:43 +0000 (08:22 -0500)
Don't show the group filter where there is only one

src/Model/Group.php

index b32b61e103036659e17956ac04f8cd6a1988ec07..1640cb87b1aa63471c30e2bc40e292600e0b7294 100644 (file)
@@ -400,6 +400,11 @@ class Group extends BaseObject
                        ];
                }
 
+               // Don't show the groups when there is only one
+               if (count($display_groups) <= 2) {
+                       return '';
+               }
+
                $tpl = Renderer::getMarkupTemplate('group_side.tpl');
                $o = Renderer::replaceMacros($tpl, [
                        '$add' => L10n::t('add'),