mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:55:19 +00:00
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.
This commit is contained in:
parent
fea4eac17a
commit
6d05d502e3
1 changed files with 19 additions and 30 deletions
|
@ -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(scroll_next) {
|
||||
bParam_page = next_page;
|
||||
page_load = true;
|
||||
}
|
||||
else {
|
||||
bParam_page = 1;
|
||||
}
|
||||
|
||||
if(page_load)
|
||||
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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue