summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-04-05 23:43:15 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-04-05 23:43:15 +0200
commitf704dfe333acea43387009bed08cc2f09dbb8fd5 (patch)
treebe5554f0ddfc28e4266e30d76ff277bd22908c3e
parent27f34bcb4b774d291c03889024e03bb36b0e19b9 (diff)
brought back starring of feeds
-rw-r--r--bl/itembl.php2
-rw-r--r--templates/part.feed.starred.php7
-rw-r--r--templates/part.items.php2
-rw-r--r--tests/unit/bl/ItemBlTest.php5
4 files changed, 10 insertions, 6 deletions
diff --git a/bl/itembl.php b/bl/itembl.php
index eaf69c3ca..504e48016 100644
--- a/bl/itembl.php
+++ b/bl/itembl.php
@@ -95,7 +95,7 @@ class ItemBl extends Bl {
public function star($feedId, $guidHash, $isStarred, $userId){
// FIXME: this can throw two possible exceptions
- $item = $this->mapper->findByGuidHash($feedId, $guidHash, $userId);
+ $item = $this->mapper->findByGuidHash($guidHash, $feedId, $userId);
if($isStarred){
$item->setStarred();
} else {
diff --git a/templates/part.feed.starred.php b/templates/part.feed.starred.php
index 3d0adde03..110549150 100644
--- a/templates/part.feed.starred.php
+++ b/templates/part.feed.starred.php
@@ -1,4 +1,7 @@
-<li ng-class="{ active: starredBl.isActive(0) }"
+<li ng-class="{
+ active: starredBl.isActive(0),
+ unread: starredBl.getUnreadCount() > 0
+ }"
ng-show="starredBl.isVisible(0)">
<a class="starred-icon"
href="#"
@@ -7,7 +10,7 @@
</a>
<span class="utils">
<span class="unread-counter">
- {{ starredBl.getStarredCount() }}
+ {{ starredBl.getUnreadCount() }}
</span>
</span>
</li> \ No newline at end of file
diff --git a/templates/part.items.php b/templates/part.items.php
index 65c057bb0..c93689cf3 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -13,7 +13,7 @@
<li ng-class="{ important: item.isStarred() }"
ng-click="itemBl.toggleStarred(item.id)"
class="star"
- title="{{ item.isStarred() }}">
+ title="<?php p($l->t('Save for later')) ?>">
</li>
</ul>
</div>
diff --git a/tests/unit/bl/ItemBlTest.php b/tests/unit/bl/ItemBlTest.php
index 1c2dedfb6..80b1281e7 100644
--- a/tests/unit/bl/ItemBlTest.php
+++ b/tests/unit/bl/ItemBlTest.php
@@ -197,8 +197,9 @@ class ItemBlTest extends \OCA\AppFramework\Utility\TestUtility {
$this->mapper->expects($this->once())
->method('findByGuidHash')
- ->with($this->equalTo($feedId),
- $this->equalTo($guidHash),
+ ->with(
+ $this->equalTo($guidHash),
+ $this->equalTo($feedId),
$this->equalTo($this->user))
->will($this->returnValue($item));