mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Pass Echo configuration to mobile
When Echo moved to packageFiles it broke the mobile unread counter behaviour Follow up to I03f9a3953aa97ead1a29c13a992a02404a6d0b68 which presumably happened when Minerva's Echo code was in a different code repository. Bug: T310358 Change-Id: Ife6705d69d248bcd4efde1a996dbcc0353c7f40d
This commit is contained in:
parent
e515e47392
commit
6767e52d8c
|
@ -330,6 +330,10 @@
|
|||
"packageFiles": [
|
||||
"mobile/notifications.js",
|
||||
"mobile/list.js",
|
||||
{
|
||||
"name": "mobile/config.json",
|
||||
"callback": "MediaWiki\\Extension\\Notifications\\Hooks::getConfigVars"
|
||||
},
|
||||
"mobile/overlay.js",
|
||||
"mobile/NotificationBadge.js",
|
||||
"mobile/notificationsFilterOverlay.js"
|
||||
|
|
|
@ -23,7 +23,7 @@ var mobile = mw.mobileFrontend.require( 'mobile.startup' ),
|
|||
*/
|
||||
function notificationsList( echo, markAllReadButton, onCountChange, onNotificationListRendered ) {
|
||||
var wrapperWidget,
|
||||
maxNotificationCount = mw.config.get( 'wgEchoMaxNotificationCount' ),
|
||||
maxNotificationCount = require( './config.json' ).EchoMaxNotificationCount,
|
||||
echoApi = new echo.api.EchoApi(),
|
||||
unreadCounter = new echo.dm.UnreadNotificationCounter( echoApi, 'all', maxNotificationCount ),
|
||||
modelManager = new echo.dm.ModelManager( unreadCounter, { type: [ 'message', 'alert' ] } ),
|
||||
|
|
Loading…
Reference in a new issue