Merge pull request #9487 from MrPetovan/bug/9432-network-infinite-load-ajax

Fix infinite content ajax call parameters
This commit is contained in:
Michael Vogel 2020-11-03 19:47:02 +01:00 committed by GitHub
commit 8fa62cbbbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -893,16 +893,29 @@ function loadScrollContent() {
// get the raw content from the next page and insert this content
// right before "#conversation-end"
$.get(infinite_scroll.reload_uri + '&mode=raw&last_received=' + received + '&last_commented=' + commented + '&last_created=' + created + '&last_uriid=' + uriid, function(data) {
$.get({
url: infinite_scroll.reload_uri,
data: {
'mode' : 'raw',
'last_received' : received,
'last_commented': commented,
'last_created' : created,
'last_uriid' : uriid
}
})
.done(function(data) {
$("#scroll-loader").hide();
if ($(data).length > 0) {
$(data).insertBefore('#conversation-end');
lockLoadContent = false;
} else {
$("#scroll-end").fadeIn('normal');
}
document.dispatchEvent(new Event('postprocess_liveupdate'));
})
.always(function () {
$("#scroll-loader").hide();
lockLoadContent = false;
});
}