aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-06-16 14:59:17 +0100
committerThomas Willingham <founder@kakste.com>2013-06-16 14:59:17 +0100
commit33696cc8392daeb08d011aa3b1209f3b121898ea (patch)
tree466d48f5abc1a4ec1dbf83543471a8ac89428516 /js/main.js
parent466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (diff)
parentc4c80a2e472173dfed9b982c6705ccfbb6e6cdab (diff)
downloadvolse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.gz
volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.bz2
volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js21
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();
+ }
}
}