summaryrefslogtreecommitdiffstats
path: root/controller/feedcontroller.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:50:46 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-17 10:51:04 +0200
commit1fbcd35ac8f868e48228aafa375c5a305554a3c3 (patch)
treef3b40fa3e34f90774097bf78ceffc7f4527fa05b /controller/feedcontroller.php
parent19b9456b6a96e8139d62a498fb31a96ed36fb442 (diff)
always return the unreadcount when marking read to set update request as 0, dont create new feeds that only consist of unreadcount updates
Diffstat (limited to 'controller/feedcontroller.php')
-rw-r--r--controller/feedcontroller.php9
1 files changed, 8 insertions, 1 deletions
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);