зеркало из https://github.com/nextcloud/news.git
dont show unread articles when there are no feeds
This commit is contained in:
Родитель
64d99e57d0
Коммит
02436eae6d
|
@ -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()
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче