From ae04c0e4e69ac5398cb51beaf3cd5cb417a77b76 Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Wed, 2 Mar 2016 16:04:04 -0800 Subject: [PATCH] Allow mark as read for a cross-wiki bundle Bug: T128562 Change-Id: I14b4885569d9d78072ae76bc9cdefd41741a435b --- .../mw.echo.ui.NotificationGroupItemWidget.js | 18 ------------------ .../mw.echo.dm.NotificationGroupItem.js | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js b/modules/ooui/mw.echo.ui.NotificationGroupItemWidget.js index 6bad6a61b..68509f97a 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' ) @@ -234,19 +229,6 @@ } }; - /** - * @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 ); - } - }; - /** * Check whether the titles should be shown and toggle them in the items. */ diff --git a/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js b/modules/viewmodel/mw.echo.dm.NotificationGroupItem.js index 2cb024354..ca958d941 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