Do not recreate blueimp each time you're scrolling in the photos page, fixes #8118

This commit is contained in:
flaburgan 2022-10-31 11:21:08 +01:00
parent bfe1b84a2e
commit 35c254c88c

View file

@ -2,23 +2,16 @@
app.views.Photos = app.views.InfScroll.extend({
className: "clearfix row",
postClass : app.views.Photo,
initialize : function() {
this.stream = this.model;
this.collection = this.stream.items;
new app.views.Gallery({el: this.$el});
// viable for extraction
this.stream.fetch();
this.setupInfiniteScroll();
},
postRenderTemplate: function(){
var photoAttachments = $("#main-stream > div");
if(photoAttachments.length > 0) {
new app.views.Gallery({ el: photoAttachments });
}
}
});
// @license-end