mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Merge "Only fetch 'unreadfirst' for the Popup, not Special:Notifications"
This commit is contained in:
commit
39fef27775
|
@ -119,7 +119,6 @@
|
|||
notsections: this.normalizedType[ type ],
|
||||
notformat: 'model',
|
||||
notlimit: this.limit,
|
||||
notunreadfirst: 1,
|
||||
notprop: 'list|count',
|
||||
uselang: this.userLang
|
||||
}, this.getTypeParams( type ) );
|
||||
|
|
|
@ -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' :
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue