Jdlrobson has uploaded a new change for review.

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

Change subject: WIP: Don't show deleted pages on collection view of watchlist
......................................................................

WIP: Don't show deleted pages on collection view of watchlist

This is problematic since it breaks how pagination works.

Bug: T93295
Change-Id: Ief67a11017c262c24b41a64c0359106751efa459
---
M includes/views/Collection.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/01/205301/1

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 4aa2a7a..e973a2c 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -152,9 +152,12 @@
         */
        public function getCollectionItems( models\Collection $collection ) {
                $html = Html::openElement( 'div', array( 'class' => 
'collection-cards' ) );
+               $isWatchlist = $collection->isWatchlist();
                foreach ( $collection as $item ) {
-                       $view = new CollectionItemCard( $item );
-                       $html .= $view->getHtml();
+                       if ( !$isWatchlist || $item->getTitle()->isKnown() ) {
+                               $view = new CollectionItemCard( $item );
+                               $html .= $view->getHtml();
+                       }
                }
                // FIXME: Pagination(??) currently we
                // limit the size of the collection

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief67a11017c262c24b41a64c0359106751efa459
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to