mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Mark all notifications in a foreign bundle as read
Foreign notifications, though non-expandable, can represent bundles (4 new topics on your talk page). When marking one as read, it's important to provide all the IDs that are part of that bundle. Otherwise, only the dynamic base is marked as read and the bundle shows up again on reload (3 new topics on your talk page). For bundles that do not include the count (The description on Flow_Page was edited multiple times) it looks like the mark-as-read action did not work. Tagging with T140309 as it may explain it but not 100% sure. Bug: T140309 Change-Id: I19c9eb18669b7cad8173c966392a6e5977018121
This commit is contained in:
parent
97d8cb740a
commit
3b4e4d30a8
|
@ -629,6 +629,7 @@
|
|||
mw.echo.Controller.prototype.markCrossWikiItemsRead = function ( itemIds, source ) {
|
||||
var sourceModel,
|
||||
notifs,
|
||||
allIds = [],
|
||||
xwikiModel = this.manager.getNotificationModel( 'xwiki' );
|
||||
|
||||
if ( !xwikiModel ) {
|
||||
|
@ -644,7 +645,10 @@
|
|||
// Update pagination count
|
||||
this.manager.updateCurrentPageItemCount();
|
||||
|
||||
return this.api.markItemsRead( itemIds, source, true )
|
||||
notifs.forEach( function ( notif ) {
|
||||
allIds = allIds.concat( notif.getAllIds() );
|
||||
} );
|
||||
return this.api.markItemsRead( allIds, source, true )
|
||||
.then( this.refreshUnreadCount.bind( this ) );
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue