Merge "Only fetch 'unreadfirst' for the Popup, not Special:Notifications"

This commit is contained in:
jenkins-bot 2016-07-08 13:37:57 +00:00 committed by Gerrit Code Review
commit 39fef27775
3 changed files with 7 additions and 2 deletions

View file

@ -119,7 +119,6 @@
notsections: this.normalizedType[ type ],
notformat: 'model',
notlimit: this.limit,
notunreadfirst: 1,
notprop: 'list|count',
uselang: this.userLang
}, this.getTypeParams( type ) );

View file

@ -98,6 +98,8 @@
* defining the offset to fetch notifications
* @param {string} [filterObject.readState] Notification read
* state, 'all', 'read' or 'unread'
* @param {boolean} [filterObject.unreadFirst] Fetch unread notifications
* first in the sorting order.
* @param {string|string[]} [filterObject.titles] Requested titles. To request notifications with no title,
* use null (standalone or as an array element).
* @return {Object} API parameter definitions to override
@ -114,6 +116,10 @@
overrideParams.notcontinue = filterObject.continue;
}
if ( filterObject.unreadFirst ) {
overrideParams.notunreadfirst = 1;
}
if ( filterObject.readState && filterObject.readState !== 'all' ) {
overrideParams.notfilter = filterObject.readState === 'read' ?
'read' :

View file

@ -226,7 +226,7 @@
// between local notifications and x-wiki notifications
// until the backend gives us the x-wiki notifications as
// part of the original response.
return this.api.fetchNotifications( this.manager.getTypeString(), 'local', !!isForced )
return this.api.fetchNotifications( this.manager.getTypeString(), 'local', !!isForced, { unreadFirst: true } /* filters */ )
.then(
// Success
function ( data ) {