mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Mark notifications as automatically read only after the popup loads
We've corrected this behavior for updating seenTime but not for setting the notifications as read if the widget is configured as 'markReadWhenSeen' which produced unexpected issues with updating alerts. This is fixed in this commit. Change-Id: I4d2420a81d2b8409749ad1621b2d56bdd14e8c6e
This commit is contained in:
parent
d15615ea89
commit
f6c9e68577
|
@ -260,11 +260,6 @@
|
|||
|
||||
// Log impressions
|
||||
mw.echo.logger.logNotificationImpressions( this.type, idArray, mw.echo.Logger.static.context.popup );
|
||||
|
||||
// // Mark notifications as 'read' if markReadWhenSeen is set to true
|
||||
if ( widget.popup.isVisible() && widget.markReadWhenSeen ) {
|
||||
return widget.notificationsModel.markAllRead();
|
||||
}
|
||||
} )
|
||||
.then(
|
||||
// Success
|
||||
|
@ -329,6 +324,10 @@
|
|||
if ( widget.popup.isVisible() ) {
|
||||
// Update seen time
|
||||
widget.notificationsModel.updateSeenTime();
|
||||
// Mark notifications as 'read' if markReadWhenSeen is set to true
|
||||
if ( widget.markReadWhenSeen ) {
|
||||
widget.notificationsModel.markAllRead();
|
||||
}
|
||||
}
|
||||
} );
|
||||
this.hasRunFirstTime = true;
|
||||
|
|
Loading…
Reference in a new issue