aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-26 17:17:24 -0700
committerfriendica <info@friendica.com>2014-06-26 17:17:24 -0700
commit6d05d502e3d69c0d7ac45ecc3558668f7acf5266 (patch)
tree9477d797fe1e374a3c7a069e63c4d7c3030679a2 /view
parentfea4eac17a5979fc5ffe0ac74e626c3cc562a45e (diff)
downloadvolse-hubzilla-6d05d502e3d69c0d7ac45ecc3558668f7acf5266.tar.gz
volse-hubzilla-6d05d502e3d69c0d7ac45ecc3558668f7acf5266.tar.bz2
volse-hubzilla-6d05d502e3d69c0d7ac45ecc3558668f7acf5266.zip
still trying to sort out the liveupdate issues. This was getting overly complicated with all the different ways we've tried to fix this issue so let's step back and simplify it a bit.
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js51
1 files changed, 20 insertions, 31 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 26cf12b47..191f24b59 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -386,8 +386,6 @@
function updateConvItems(mode,data) {
-
-
if(mode === 'update') {
prev = 'threads-begin';
@@ -546,14 +544,6 @@ function updateConvItems(mode,data) {
collapseHeight();
}
-
- // $(".wall-item-body").each(function() {
- // if(! $(this).hasClass('divmore')) {
- // $(this).divgrow({ initialHeight: 400, showBrackets: false });
- // $(this).addClass('divmore');
- // }
- //});
-
}
@@ -589,30 +579,29 @@ function updateConvItems(mode,data) {
in_progress = true;
var update_url;
+ var update_mode;
-// if(typeof buildCmd == 'function') {
- if(scroll_next) {
- bParam_page = next_page;
- page_load = true;
- }
- else {
- bParam_page = 1;
- }
- update_url = buildCmd();
-// }
-// else {
-// page_load = false;
-// var udargs = ((page_load) ? '/load' : '');
-// update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0);
-// }
-
- if(page_load)
+ if(scroll_next) {
+ bParam_page = next_page;
+ page_load = true;
+ }
+ else {
+ bParam_page = 1;
+ }
+
+ update_url = buildCmd();
+
+ if(page_load) {
$("#page-spinner").spin('small');
+ if(bParam_page == 1)
+ update_mode = 'replace';
+ else
+ update_mode = 'append';
+ }
+ else
+ update_mode = 'update';
$.get(update_url,function(data) {
- var update_mode = ((page_load && bParam_page == 1) ? 'replace' : 'update');
- if(scroll_next)
- update_mode = 'append';
page_load = false;
scroll_next = false;
updateConvItems(update_mode,data);
@@ -627,7 +616,7 @@ function updateConvItems(mode,data) {
// As it turns out this causes a bit of an inefficiency
// as we're pinging twice for every update, once before
// and once after. A btter way to do this is to rewrite
- // NavUpdate and perhpas LiveUpdate so that we check for
+ // NavUpdate and perhaps LiveUpdate so that we check for
// post updates first and only call the notification ping
// once.