From 1fbcd35ac8f868e48228aafa375c5a305554a3c3 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 17 Apr 2013 10:50:46 +0200 Subject: always return the unreadcount when marking read to set update request as 0, dont create new feeds that only consist of unreadcount updates --- controller/feedcontroller.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'controller/feedcontroller.php') diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php index 53257d73c..11cb60d5e 100644 --- a/controller/feedcontroller.php +++ b/controller/feedcontroller.php @@ -162,7 +162,14 @@ class FeedController extends Controller { $feed = $this->feedBusinessLayer->update($feedId, $userId); $params = array( - 'feeds' => array($feed) + 'feeds' => array( + // only pass unreadcount to not accidentally readd + // the feed again + array( + 'id' => $feed->getId(), + 'unreadCount' => $feed->getUnreadCount() + ) + ) ); return $this->renderJSON($params); -- cgit v1.2.3