mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 09:40:41 +00:00
Fix various bugs in mw.echo.Logger and its callers
* Fix typo that caused logInteraction() to never do anything * Fix incorrect context parameter passed by NotificationBadgeWidget * Consistently use mw.Echo.Logger.static.context.* constants for the context parameter everywhere Bug: T114833 Change-Id: I140e4222169ad9e78c6bf016d9765828513adcbb
This commit is contained in:
parent
bb89634306
commit
877e621a6a
|
@ -89,7 +89,7 @@
|
|||
* @param {boolean} [mobile] True if interaction was on a mobile device
|
||||
*/
|
||||
mw.echo.Logger.prototype.logInteraction = function ( action, context, eventId, eventType, mobile ) {
|
||||
if ( !this.constructor.clickThroughEnabled ) {
|
||||
if ( !this.constructor.static.clickThroughEnabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@
|
|||
// Log the click event
|
||||
mw.echo.logger.logInteraction(
|
||||
'ui-badge-link-click',
|
||||
mw.echo.Logger.static.context,
|
||||
mw.echo.Logger.static.context.badge,
|
||||
null,
|
||||
this.type
|
||||
);
|
||||
|
@ -337,7 +337,7 @@
|
|||
if ( items[ i ].getModel ) {
|
||||
mw.echo.logger.logInteraction(
|
||||
mw.echo.Logger.static.actions.notificationImpression,
|
||||
'flyout',
|
||||
mw.echo.Logger.static.context.popup,
|
||||
items[ i ].getModel().getId(),
|
||||
items[ i ].getModel().getCategory()
|
||||
);
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
// Log notification click
|
||||
mw.echo.logger.logInteraction(
|
||||
mw.echo.Logger.static.actions.notificationClick,
|
||||
'flyout',
|
||||
mw.echo.Logger.static.context.popup,
|
||||
widget.getModel().getId(),
|
||||
widget.getModel().getCategory()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue