aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2025-06-19 08:08:16 +0000
committerMario <mario@mariovavti.com>2025-06-19 08:08:16 +0000
commit4a813c150c0307466ac6fb4ff5e8d70755c027c2 (patch)
tree8c85e4a7e3b9d9449b6a5f461766112ede0ddeac /view
parent44600c46c6973d32b6ed10b1e230e5267a334a8c (diff)
downloadvolse-hubzilla-4a813c150c0307466ac6fb4ff5e8d70755c027c2.tar.gz
volse-hubzilla-4a813c150c0307466ac6fb4ff5e8d70755c027c2.tar.bz2
volse-hubzilla-4a813c150c0307466ac6fb4ff5e8d70755c027c2.zip
make sure to set the state on the correct button
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 6e7e2a42f..5bf7234aa 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -901,10 +901,14 @@ function updateConvItems(mode, data) {
document.documentElement.style.setProperty('--hz-item-highlight', stringToHslColor(JSON.parse(elem.parentNode.parentNode.dataset.b64mids)[0]));
}
+ let elemSubThreadWrapper = elem.querySelector('.wall-item-sub-thread-wrapper');
+ let elemCommentButton = elem.querySelector('.wall-item-comment');
+
// Set the button and sub-thread-wrapper state
- if (elem.parentNode.parentNode.querySelector('.wall-item-comment')) {
- elem.parentNode.parentNode.querySelector('.wall-item-comment').classList.add('expanded');
+ if (elemCommentButton && elemSubThreadWrapper.children.length) {
+ elemCommentButton.classList.add('expanded');
}
+
elem.parentNode.classList.add('item-expanded');
}