summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/app/services/businesslayer/subscriptionsbusinesslayer.coffee2
-rw-r--r--js/public/app.js2
-rw-r--r--js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee5
3 files changed, 6 insertions, 3 deletions
diff --git a/js/app/services/businesslayer/subscriptionsbusinesslayer.coffee b/js/app/services/businesslayer/subscriptionsbusinesslayer.coffee
index 2f08504eb..23cedc955 100644
--- a/js/app/services/businesslayer/subscriptionsbusinesslayer.coffee
+++ b/js/app/services/businesslayer/subscriptionsbusinesslayer.coffee
@@ -34,7 +34,7 @@ ItemModel) ->
super(activeFeed, persistence, itemModel, feedType.Subscriptions)
isVisible: ->
- if @isActive(0)
+ if @isActive(0) and @_feedBusinessLayer.getNumberOfFeeds() > 0
return true
if @_showAll.getShowAll()
diff --git a/js/public/app.js b/js/public/app.js
index e38b6670d..2962731f3 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -1490,7 +1490,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
SubscriptionsBusinessLayer.prototype.isVisible = function() {
var visible;
- if (this.isActive(0)) {
+ if (this.isActive(0) && this._feedBusinessLayer.getNumberOfFeeds() > 0) {
return true;
}
if (this._showAll.getShowAll()) {
diff --git a/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee b/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
index 090433fbd..c0d674bda 100644
--- a/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
+++ b/js/tests/services/businesslayer/subsriptionsbusinesslayerSpec.coffee
@@ -60,8 +60,11 @@ describe 'SubscriptionsBusinessLayer', ->
expect(@SubscriptionsBusinessLayer.isVisible()).toBe(false)
- it 'should always be visible if its the active feed', =>
+ it 'should always be visible if its the active feed and there are feeds', =>
@ActiveFeed.handle({type: @FeedType.Subscriptions, id:0})
+ expect(@SubscriptionsBusinessLayer.isVisible()).toBe(false)
+
+ @FeedModel.add({id: 3, unreadCount: 0, url: 'hi'})
expect(@SubscriptionsBusinessLayer.isVisible()).toBe(true)