diff options
author | friendica <info@friendica.com> | 2013-06-13 19:21:45 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-06-13 19:21:45 -0700 |
commit | 9b67e114ad9da2b5e0456709affd20d9c760e4ae (patch) | |
tree | 4c076b90e3ee0544f270d8b8ad99b4e35d45f73b /js | |
parent | c7ac5a9d80907a86eff1000b35488e44d41b1915 (diff) | |
download | volse-hubzilla-9b67e114ad9da2b5e0456709affd20d9c760e4ae.tar.gz volse-hubzilla-9b67e114ad9da2b5e0456709affd20d9c760e4ae.tar.bz2 volse-hubzilla-9b67e114ad9da2b5e0456709affd20d9c760e4ae.zip |
possibly fix skipped pages on endless scroll
Diffstat (limited to 'js')
-rw-r--r-- | js/main.js | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/js/main.js b/js/main.js index 01aea6b22..f1a50e28a 100644 --- a/js/main.js +++ b/js/main.js @@ -118,6 +118,7 @@ var scroll_next = false; var next_page = 1; var page_load = true; + var loadingPage = false; $(function() { $.ajaxSetup({cache: false}); @@ -395,6 +396,10 @@ function updateConvItems(mode,data) { // $("div.wall-item-body").divgrow({ initialHeight: 400 }); } }); + + if(loadingPage) { + loadingPage = false; + } } if(mode === 'replace') { // clear existing content @@ -916,6 +921,7 @@ $(".autotime").timeago(); } + $(window).scroll(function () { if(typeof buildCmd == 'function') { $('#more').hide(); @@ -927,12 +933,15 @@ $(window).scroll(function () { } if($(window).scrollTop() + $(window).height() == $(document).height()) { - $('#more').hide(); - $('#no-more').hide(); - // alert('scroll'); - next_page++; - scroll_next = true; - liveUpdate(); + if(! loadingPage) { + $('#more').hide(); + $('#no-more').hide(); + // alert('scroll'); + next_page++; + scroll_next = true; + loadingPage = true; + liveUpdate(); + } } } |