jenkins-bot has submitted this change and it was merged.

Change subject: Include cross-wiki notifications in serverside-rendered badge
......................................................................


Include cross-wiki notifications in serverside-rendered badge

getNotificationCount only includes the amount of local notifications.
getMessageCount & getAlertCount also include the count on foreign wikis.

Bug: T130662
Change-Id: I4d49b543a390294ac6550728d2453ca773efb044
---
M includes/skins/SkinMinerva.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Sbisson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index fc638ab..9a80505 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -283,7 +283,8 @@
                        $notificationsTitle = SpecialPage::getTitleFor( 
'Notifications' );
                        $notificationsMsg = $this->msg( 
'mobile-frontend-user-button-tooltip' )->text();
                        if ( $currentTitle->getPrefixedText() !== 
$notificationsTitle->getPrefixedText() ) {
-                               $count = MWEchoNotifUser::newFromUser( $user 
)->getNotificationCount();
+                               $notifUser = MWEchoNotifUser::newFromUser( 
$user );
+                               $count = $notifUser->getAlertCount() + 
$notifUser->getMessageCount();
                                $isZero = $count === 0;
                                $countLabel = 
EchoNotificationController::formatNotificationCount( $count );
                        }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d49b543a390294ac6550728d2453ca773efb044
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
Gerrit-Reviewer: Sbisson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to