summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
Diffstat (limited to 'controller')
-rw-r--r--controller/feedcontroller.php9
-rw-r--r--controller/itemcontroller.php11
2 files changed, 18 insertions, 2 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);
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php
index 5387f40a2..9081578ed 100644
--- a/controller/itemcontroller.php
+++ b/controller/itemcontroller.php
@@ -169,7 +169,16 @@ class ItemController extends Controller {
$highestItemId = (int) $this->params('highestItemId');
$this->itemBusinessLayer->readFeed($feedId, $highestItemId, $userId);
- return $this->renderJSON();
+
+ $params = array(
+ 'feeds' => array(
+ array(
+ 'id' => $feedId,
+ 'unreadCount' => 0
+ )
+ )
+ );
+ return $this->renderJSON($params);
}