aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-15 14:41:24 -0800
committerFriendika <info@friendika.com>2010-12-15 14:41:24 -0800
commitdf2e79dcaf28810e31d4bdc48bdb76e12f70e817 (patch)
tree402d50aa88de4dfddb46258f1cca6d86833d79cd /include
parent83939f1541219c38f03b90f525ea48512f912323 (diff)
downloadvolse-hubzilla-df2e79dcaf28810e31d4bdc48bdb76e12f70e817.tar.gz
volse-hubzilla-df2e79dcaf28810e31d4bdc48bdb76e12f70e817.tar.bz2
volse-hubzilla-df2e79dcaf28810e31d4bdc48bdb76e12f70e817.zip
prevent concurrent ajax updates
Diffstat (limited to 'include')
-rw-r--r--include/main.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/main.js b/include/main.js
index 1b5553161..ef6b059cc 100644
--- a/include/main.js
+++ b/include/main.js
@@ -25,6 +25,7 @@
var timer = null;
var pr = 0;
var liking = 0;
+ var in_progress = false;
$(document).ready(function() {
$.ajaxSetup({cache: false});
@@ -87,13 +88,15 @@
function liveUpdate() {
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
- if($('.comment-edit-text-full').length) {
+ if(($('.comment-edit-text-full').length) || (in_progress)) {
livetime = setTimeout(liveUpdate, 10000);
return;
}
prev = 'live-' + src;
+ in_progress = true;
$.get('update_' + src + '?p=' + profile_uid + '&msie=' + ((msie) ? 1 : 0),function(data) {
+ in_progress = false;
$('.wall-item-outside-wrapper',data).each(function() {
var ident = $(this).attr('id');
if($('#' + ident).length == 0) {