Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/286259

Change subject: [wip] Adjust to Echo's MVC change
......................................................................

[wip] Adjust to Echo's MVC change

Change-Id: Ic544ce4394834757a3bb007a91369e01af2d0b7d
Depends-On: I97862402c41bc04dd41cd08d79f19ff677340249
---
M resources/mobile.notifications.overlay/NotificationsOverlay.js
1 file changed, 9 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/59/286259/1

diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.js 
b/resources/mobile.notifications.overlay/NotificationsOverlay.js
index 65458f1..96229c5 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.js
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.js
@@ -10,7 +10,7 @@
         * @uses mw.Api
         */
        NotificationsOverlay = function ( options ) {
-               var model, unreadCounter, wrapperWidget,
+               var modelManager, unreadCounter, controller, wrapperWidget,
                        maxNotificationCount = mw.config.get( 
'wgEchoMaxNotificationCount' ),
                        echoApi = new mw.echo.api.EchoApi();
 
@@ -28,14 +28,16 @@
                }
 
                unreadCounter = new mw.echo.dm.UnreadNotificationCounter( 
echoApi, 'all', maxNotificationCount );
-
-               model = new mw.echo.dm.NotificationsModel(
+               modelManager = new mw.echo.dm.ModelManager( unreadCounter, { 
type: [ 'message', 'alert' ] } );
+               controller = new mw.echo.Controller(
                        echoApi,
-                       unreadCounter,
-                       { type: 'all' }
+                       modelManager,
+                       {
+                               type: [ 'message', 'alert' ]
+                       }
                );
 
-               wrapperWidget = new mw.echo.ui.NotificationsWrapper( model, {
+               wrapperWidget = new mw.echo.ui.NotificationsWrapper( 
controller, modelManager, {
                        $overlay: this.$overlay
                } );
 
@@ -52,7 +54,7 @@
 
                // Populate notifications
                wrapperWidget.populate()
-                       .then( model.updateSeenTime.bind( model, 'all' ) );
+                       .then( controller.updateLocalSeenTime.bind( controller 
) );
        };
 
        OO.mfExtend( NotificationsOverlay, Overlay, {

-- 
To view, visit https://gerrit.wikimedia.org/r/286259
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic544ce4394834757a3bb007a91369e01af2d0b7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to