diff options
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/view/js/main.js b/view/js/main.js index aff6eab4d..fdebb5faa 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -197,8 +197,7 @@ $(document).ready(function() { if (singlethread_modules.indexOf(module) !== -1) { history.pushState(stateObj, '', module + '/' + b64mid); - $('.message').removeClass('active'); - $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + } if (b64mid) { @@ -207,6 +206,9 @@ $(document).ready(function() { if(! page_load) { prepareLiveUpdate(b64mid, notify_id); + $('.message').removeClass('active'); + $('[data-b64mid="' + b64mid + '"].message').addClass('active'); + $('[data-b64mid="' + b64mid + '"].message .badge').remove(); } } } @@ -644,7 +646,6 @@ function updatePageItems(mode, data) { function updateConvItems(mode,data) { - var scroll_position = $(window).scrollTop(); if(mode !== 'update') @@ -657,10 +658,6 @@ function updateConvItems(mode,data) { next = 'threads-end'; } - if(mode === 'replace') { - $('.thread-parent').remove(); // clear existing content - } - $('.thread-wrapper', data).each(function() { if(this.classList.contains('toplevel_item')) { var ident = this.id; @@ -953,9 +950,13 @@ function liveUpdate(notify_id) { console.log('displaying: ' + update_url); if(page_load) { + $("#page-spinner").show(); - if(bParam_page == 1) + + if(bParam_page == 1) { update_mode = 'replace'; + $('.thread-wrapper').remove(); + } else update_mode = 'append'; } |