changed the recursion to load posts to a while loop

This commit is contained in:
Baris Usakli
2013-08-20 12:31:08 -04:00
parent 1e66116e1d
commit 2b7a1b7515

View File

@@ -343,14 +343,13 @@ var socket,
if(!pid)
return;
var container = $(document.body),
scrollTo = $('#post_anchor_' + pid);
scrollTo = $('#post_anchor_' + pid),
tid = $('#post-container').attr('data-tid');
if(!scrollTo.length) {
var tid = $('#post-container').attr('data-tid');
while(!scrollTo.length) {
app.loadMorePosts(tid, function() {
app.scrollToPost(pid);
scrollTo = $('#post_anchor_' + pid);
});
return;
}
container.animate({