Only show multi info bar subreddit categorize bubbles if logged in.

This commit is contained in:
Max Goodman
2013-05-07 02:07:00 -07:00
parent 6516e74c40
commit 80813ce073

View File

@@ -156,16 +156,22 @@ r.multi.MultiSubredditItem = Backbone.View.extend({
this.$el.append(this.template({
srName: this.model.get('name')
}))
this.bubble = new r.multi.MultiSubscribeBubble({
parent: this.$el,
group: this.options.bubbleGroup,
srName: this.model.get('name')
})
if (r.config.logged) {
this.bubble = new r.multi.MultiSubscribeBubble({
parent: this.$el,
group: this.options.bubbleGroup,
srName: this.model.get('name')
})
}
return this
},
remove: function() {
this.bubble.remove()
if (this.bubble) {
this.bubble.remove()
}
Backbone.View.prototype.remove.apply(this)
},