jenkins-bot has submitted this change and it was merged.
Change subject: Hygiene: use self where possible
......................................................................
Hygiene: use self where possible
Change-Id: I30e9d6ea8b59e168fc5b151f215c3592f475bedf
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Bsitu: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/overlay/ext.echo.overlay.js
b/modules/overlay/ext.echo.overlay.js
index 558cabc..3f77f16 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -66,7 +66,7 @@
var count;
if (
result.query.echomarkread.count !== undefined ) {
count =
result.query.echomarkread.count;
-
mw.echo.overlay.updateCount( count, result.query.echomarkread.rawcount );
+ self.updateCount(
count, result.query.echomarkread.rawcount );
// Reset header to
'Notifications'
$(
'#mw-echo-overlay-title-text' ).html( mw.msg( 'echo-overlay-title' ) );
}
@@ -155,7 +155,7 @@
// database updates. If the count is more than the
maximum, it could
// be thousands.
includeMarkAsReadButton = overflow &&
- unreadRawTotalCount <
mw.echo.overlay.configuration[ 'max-notification-count' ];
+ unreadRawTotalCount < this.configuration[
'max-notification-count' ];
if ( includeMarkAsReadButton ) {
// Add the 'mark all as read' button to the
title area
$title.append( this._getMarkAsReadButton() );
@@ -207,7 +207,7 @@
$ul = $( '<ul>' ).addClass(
'mw-echo-notifications' );
if ( unreadTotalCount !== undefined ) {
- mw.echo.overlay.updateCount(
unreadTotalCount, unreadRawTotalCount );
+ self.updateCount( unreadTotalCount,
unreadRawTotalCount );
}
$ul.css( 'max-height', notificationLimit * 95 +
'px' );
$.each( notifications.index, function ( index,
id ) {
@@ -294,6 +294,7 @@
* @param {array} unread a list of unread ids
*/
markAsRead: function( unread ) {
+ var self = this;
// only need to mark as read if there is unread item
if ( unread.length > 0 ) {
this.api.post( mw.echo.desktop.appendUseLang( {
@@ -304,7 +305,7 @@
var count;
if ( result.query.echomarkread.count
!== undefined ) {
count =
result.query.echomarkread.count;
- mw.echo.overlay.updateCount(
count, result.query.echomarkread.rawcount );
+ self.updateCount( count,
result.query.echomarkread.rawcount );
}
} );
}
--
To view, visit https://gerrit.wikimedia.org/r/151990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I30e9d6ea8b59e168fc5b151f215c3592f475bedf
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits