Mooeypoo has uploaded a new change for review.

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

Change subject: Allow mark as read for a cross-wiki bundle
......................................................................

Allow mark as read for a cross-wiki bundle

Bug: T128562
Change-Id: I14b4885569d9d78072ae76bc9cdefd41741a435b
---
M modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js
M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
2 files changed, 1 insertion(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/06/274606/1

diff --git a/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js 
b/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js
index 6bad6a6..68509f9 100644
--- a/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js
@@ -22,11 +22,6 @@
                OO.ui.mixin.GroupWidget.call( this, config );
                OO.ui.mixin.PendingElement.call( this, config );
 
-               // Hide the [x] mark as read button for foreign notifications
-               if ( this.getModel().isForeign() ) {
-                       this.toggleMarkAsReadButtons( false );
-               }
-
                this.setPendingElement( this.$group );
                this.$group
                        .addClass( 
'mw-echo-ui-notificationGroupItemWidget-group' )
@@ -231,19 +226,6 @@
                        this.$group.slideDown();
                } else {
                        this.$group.slideUp();
-               }
-       };
-
-       /**
-        * @inheritdoc
-        */
-       mw.echo.ui.NotificationGroupItemWidget.prototype.toggleRead = function 
( read ) {
-               // Parent method
-               
mw.echo.ui.NotificationGroupItemWidget.parent.prototype.toggleRead.call( this, 
read );
-
-               if ( this.getModel().isForeign() ) {
-                       // Never show the [x] mark-all-unread button for 
foreign bundles
-                       this.toggleMarkAsReadButtons( false );
                }
        };
 
diff --git a/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js 
b/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
index 2cb0243..ca958d9 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
@@ -168,7 +168,7 @@
                                } else {
                                        // Create a fake resolved promise for 
models that already
                                        // have items in them
-                                       promise = $.Deferred().resolve();
+                                       promise = $.Deferred().resolve( 
notifModels[ i ].getAllItemIds() );
                                }
 
                                // For each of those, mark items as read in the 
UI and API

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14b4885569d9d78072ae76bc9cdefd41741a435b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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