diff options
author | Mario <mario@mariovavti.com> | 2025-06-18 15:55:15 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-06-18 15:55:15 +0000 |
commit | ce618facc81754a6f0bd544aea806d4037b4521f (patch) | |
tree | e1ad97d29f168ca692c3d92ff7517b0cb97e9155 | |
parent | 18016ab36a6f79fa607bd75d8a2b4913be50617b (diff) | |
download | volse-hubzilla-ce618facc81754a6f0bd544aea806d4037b4521f.tar.gz volse-hubzilla-ce618facc81754a6f0bd544aea806d4037b4521f.tar.bz2 volse-hubzilla-ce618facc81754a6f0bd544aea806d4037b4521f.zip |
properly set the comment button and sub-thread-wrapper state if we are loading a conversation in partly expanded mode
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | view/js/main.js | 13 |
2 files changed, 8 insertions, 7 deletions
@@ -70,7 +70,7 @@ require_once('include/security.php'); define('PLATFORM_NAME', 'hubzilla'); -define('STD_VERSION', '10.3.72'); +define('STD_VERSION', '10.3.73'); define('ZOT_REVISION', '6.0'); define('DB_UPDATE_VERSION', 1263); diff --git a/view/js/main.js b/view/js/main.js index b1cae8fb8..68528eefa 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -894,15 +894,16 @@ function updateConvItems(mode, data) { let data_json = JSON.parse(elem.dataset.b64mids); - // Also highlight the thread parent - if (data_json.includes(bParam_mid) && elem.parentNode.classList.contains('wall-item-sub-thread-wrapper')) { - if (!elem.parentNode.parentNode.classList.contains('toplevel_item')) { + if (elem.parentNode.children.length) { + // Set the highlight state + if (data_json.includes(bParam_mid) && !elem.parentNode.parentNode.classList.contains('toplevel_item')) { elem.parentNode.parentNode.classList.add('item-highlight'); document.documentElement.style.setProperty('--hz-item-highlight', stringToHslColor(JSON.parse(elem.parentNode.parentNode.dataset.b64mids)[0])); - // Mark the comment button at the parent expanded - // TODO: should do that for all comments that have replies expanded - elem.parentNode.parentNode.querySelector('.wall-item-comment').classList.add('expanded'); } + + // Set the button and sub-thread-wrapper state + elem.parentNode.parentNode.querySelector('.wall-item-comment').classList.add('expanded'); + elem.parentNode.classList.add('item-expanded'); } b64mids.push(...data_json); |