From 35c254c88c086bd457b642b9e517625174026548 Mon Sep 17 00:00:00 2001 From: flaburgan Date: Mon, 31 Oct 2022 11:21:08 +0100 Subject: Do not recreate blueimp each time you're scrolling in the photos page, fixes #8118 --- app/assets/javascripts/app/views/photos_view.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/assets/javascripts/app/views/photos_view.js b/app/assets/javascripts/app/views/photos_view.js index 7390a357c..14d484dd9 100644 --- a/app/assets/javascripts/app/views/photos_view.js +++ b/app/assets/javascripts/app/views/photos_view.js @@ -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 -- cgit v1.2.3