aboutsummaryrefslogtreecommitdiffstats
path: root/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
index 4938c6acd..2d1e9ab76 100644
--- a/js/main.js
+++ b/js/main.js
@@ -346,14 +346,26 @@ function updateConvItems(mode,data) {
if(mode === 'update') {
prev = 'threads-begin';
+
$('.thread-wrapper.toplevel_item',data).each(function() {
+
var ident = $(this).attr('id');
+ var commentWrap = $('#'+ident+' .collapsed-comments').attr('id');
+ var itmId = 0;
+ var isVisible = false;
+ if(typeof commentWrap !== 'undefined')
+ itmId = commentWrap.replace('collapsed-comments-','');
+
if($('#' + ident).length == 0 && profile_page == 1) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
+ if($('#collapsed-comments-'+itmId).is(':visible'))
+ isVisible = true;
$('#' + prev).after($(this));
+ if(isVisible)
+ showHideComments(itmId);
$(".autotime").timeago();
// divgrow doesn't prevent itself from attaching a second (or 500th)
// "show more" div to a content region - it also has a few other
@@ -365,7 +377,12 @@ function updateConvItems(mode,data) {
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
+ // more FIXME related to expanded comments
+ if($('#collapsed-comments-'+itmId).is(':visible'))
+ isVisible = true;
$('#' + ident).replaceWith($(this));
+ if(isVisible)
+ showHideComments(itmId);
$(".autotime").timeago();
// $("div.wall-item-body").divgrow({ initialHeight: 400 });