From: Andrew Dolgov Date: Mon, 9 Jun 2014 09:23:27 +0000 (+0400) Subject: getPreviousFeed: wrap to last feed to be consistent with getNextFeed X-Git-Tag: 1.13~18 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e79b401e97c15b6a9a492e9e50ed0d791a6da1b7;p=tt-rss.git getPreviousFeed: wrap to last feed to be consistent with getNextFeed --- diff --git a/js/FeedTree.js b/js/FeedTree.js index e35417da..4ae82d8d 100644 --- a/js/FeedTree.js +++ b/js/FeedTree.js @@ -539,7 +539,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, { } items = this.model.store._arrayOfAllItems; - var item = items[0]; + var item = items[0] == treeItem ? items[items.length-1] : items[0]; for (var i = 0; i < items.length; i++) { if (items[i] == treeItem) {