If the Overflow menu is visible, don't render user links

User links bar has the items already rendered in toolbar/overflow
menus. There is no need to render user links if the overflow menu
is available.

Bug: T224735
Change-Id: I613fa68b6cd43acf07bcb85af77d0239dc6bba6b
This commit is contained in:
Piotr Miazga 2019-06-21 22:07:11 +02:00 committed by Pmiazga
parent 62090bcd69
commit 686e116d60
1 changed files with 5 additions and 1 deletions

View File

@ -560,6 +560,7 @@ class SkinMinerva extends SkinTemplate {
}
return Html::rawElement( 'h1', [ 'id' => 'section_0' ], $heading );
}
/**
* Create and prepare header and footer content
* @param BaseTemplate $tpl
@ -569,7 +570,10 @@ class SkinMinerva extends SkinTemplate {
$user = $this->getUser();
$out = $this->getOutput();
$tpl->set( 'taglinehtml', $this->getTaglineHtml() );
if ( $this->getUserPageHelper()->isUserPage() ) {
if ( $this->getUserPageHelper()->isUserPage() &&
// when overflow menu is visible, we don't need to build secondary options
// as most of options are visible on Toolbar/Overflow menu
!$this->skinOptions->get( SkinOptions::OPTION_OVERFLOW_SUBMENU ) ) {
$pageUser = $this->getUserPageHelper()->getPageUser();
$talkPage = $pageUser->getTalkPage();
$data = [