Fixed potential performance bottleneck
This commit is contained in:
parent
cb88c90cbd
commit
9a53ab5615
@ -143,10 +143,6 @@ view.album = {
|
||||
|
||||
var photosData = '';
|
||||
|
||||
// Save and reset scroll position
|
||||
view.albums.content.scrollPosition = $(document).scrollTop();
|
||||
$('html, body').scrollTop(0);
|
||||
|
||||
if (album.json.content&&album.json.content!==false) {
|
||||
|
||||
// Build photos
|
||||
@ -156,6 +152,10 @@ view.album = {
|
||||
|
||||
}
|
||||
|
||||
// Save and reset scroll position
|
||||
view.albums.content.scrollPosition = $(document).scrollTop();
|
||||
requestAnimationFrame(() => $(document).scrollTop(0));
|
||||
|
||||
// Add photos to view
|
||||
lychee.content.html(photosData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user