Remove no posts info after rendering with available posts

This commit is contained in:
Steffen van Bergerem 2017-08-11 02:22:54 +02:00
parent 4c7948c7f7
commit ba9a2cbeba
No known key found for this signature in database
GPG key ID: 315C9787D548DC6B

View file

@ -51,6 +51,12 @@ app.views.InfScroll = app.views.Base.extend({
}
},
postRenderTemplate: function() {
if (this.postViews.length > 0) {
this.$(".no-posts-info").closest(".stream-element").remove();
}
},
showNoPostsInfo: function() {
if (this.postViews.length === 0) {
var noPostsInfo = new app.views.NoPostsInfo();