Skip to content

Commit

Permalink
hide convlist labels when no starred convs
Browse files Browse the repository at this point in the history
  • Loading branch information
davibe committed Jul 30, 2015
1 parent b7ca9c2 commit 344b903
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui/views/convlist.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ module.exports = view (models) ->
ev.preventDefault()
action 'selectConv', c

starred = (c for c in convs when conv.isStarred(c))
others = (c for c in convs when not conv.isStarred(c))
div class: 'starred', ->
div class: 'label', 'Favorites'
starred = (c for c in convs when conv.isStarred(c))
div class: 'label', 'Favorites' if starred.length > 0
starred.forEach renderConv
div class: 'others', ->
div class: 'label', 'Recent'
others = (c for c in convs when not conv.isStarred(c))
div class: 'label', 'Recent' if starred.length > 0
others.forEach renderConv

0 comments on commit 344b903

Please sign in to comment.