diff options
-rw-r--r-- | view/js/main.js | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/view/js/main.js b/view/js/main.js index f3aa0e7a8..1645edc9d 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -518,6 +518,8 @@ function showHideComments(id) { let oldClass = isCollapsed ? 'bi-chevron-down' : 'bi-chevron-up'; let newClass = isCollapsed ? 'bi-chevron-up' : 'bi-chevron-down'; hideCommentsIcon.classList.replace(oldClass, newClass); + + setTimeout(collapseHeight, 100); } function openClose(theID, display) { @@ -790,12 +792,9 @@ function updateConvItems(mode, data) { mediaPlaying = event.type === 'playing'; } - imagesLoaded(document.querySelectorAll('.wall-item-body img, .wall-photo-item img'), function () { - collapseHeight(); - if (bParam_mid && mode === 'replace') { - scrollToItem(); - } - }); + if (bParam_mid && mode === 'replace') { + scrollToItem(); + } // reset rotators and cursors we may have set before reaching this place let pageSpinner = document.getElementById("page-spinner"); @@ -809,6 +808,8 @@ function updateConvItems(mode, data) { followUpPageLoad = true; + setTimeout(collapseHeight, 100); + updateRelativeTime('.autotime'); } @@ -989,7 +990,7 @@ function scrollToItem() { } function collapseHeight() { - $(".wall-item-content:not('.divmore_checked'), .directory-collapse:not('.divmore_checked')").each(function(i) { + $(".wall-item-content:not('.divmore_checked, :hidden'), .directory-collapse:not('.divmore_checked')").each(function(i) { let orgHeight = $(this).outerHeight(true); let id = (($(this).attr('id')) ? $(this).attr('id').split('wall-item-content-').pop() : 0); let b64mid = ((typeof bParam_mid !== 'undefined') ? bParam_mid : ''); @@ -1181,10 +1182,8 @@ function liveUpdate(notify_id) { page_load = false; scroll_next = false; updateConvItems(update_mode,data); - in_progress = false; }); - }); } |