Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/323358

Change subject: Don't show the notifications bell button/badge on 
Special:Notifications
......................................................................

Don't show the notifications bell button/badge on Special:Notifications

The existing code detects this case and tries to suppress it,
but it only succeeds in breaking the counter.

Bug: T150999
Change-Id: Id53ad0bc7c55c444fe2d516e271e6a3032d404d7
---
M includes/skins/SkinMinerva.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/58/323358/1

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 35b3e07..10bb039 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -335,11 +335,14 @@
                // notifications archive, show the notifications icon in the 
header.
                if ( $this->useEcho() && $user->isLoggedIn() ) {
                        $notificationsTitle = SpecialPage::getTitleFor( 
'Notifications' );
-                       $notificationsMsg = $this->msg( 
'mobile-frontend-user-button-tooltip' )->text();
-                       if ( $currentTitle->getPrefixedText() !== 
$notificationsTitle->getPrefixedText() ) {
+                       if ( $currentTitle->equals( $notificationsTitle ) ) {
+                               // Don't show the secondary button at all
+                               $notificationsTitle = null;
+                       } else {
                                $notifUser = MWEchoNotifUser::newFromUser( 
$user );
                                $echoSeenTime = EchoSeenTime::newFromUser( 
$user )->getTime( 'all', /*flags*/ 0, TS_ISO_8601 );
 
+                               $notificationsMsg = $this->msg( 
'mobile-frontend-user-button-tooltip' )->text();
                                $notifLastUnreadTime = 
$notifUser->getLastUnreadNotificationTime();
                                $count = $notifUser->getNotificationCount();
 

-- 
To view, visit https://gerrit.wikimedia.org/r/323358
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id53ad0bc7c55c444fe2d516e271e6a3032d404d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to