aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-05 12:53:00 +0000
committerMario <mario@mariovavti.com>2024-01-05 12:53:00 +0000
commitc771d7c31a6a8817753079f0010b8e1cbda8c11a (patch)
tree65b2b8df7320bb881d242fb10e4dafb1cd17fd0d /view
parentce0e8d74973cdb24c20f3f29b5ac84a58200fa92 (diff)
downloadvolse-hubzilla-c771d7c31a6a8817753079f0010b8e1cbda8c11a.tar.gz
volse-hubzilla-c771d7c31a6a8817753079f0010b8e1cbda8c11a.tar.bz2
volse-hubzilla-c771d7c31a6a8817753079f0010b8e1cbda8c11a.zip
Ãdisplay selected mid in an open state - issue #1425
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/view/js/main.js b/view/js/main.js
index d022ee4a9..5c5e030c6 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -847,9 +847,21 @@ function scrollToItem() {
function collapseHeight() {
$(".wall-item-content:not('.divmore_checked'), .directory-collapse:not('.divmore_checked')").each(function(i) {
- var orgHeight = $(this).outerHeight(true);
- var id = $(this).attr('id')
- var open = ((expanded_items.indexOf($(this).attr('id')) === -1) ? false : true);
+ let orgHeight = $(this).outerHeight(true);
+ let id = $(this).attr('id');
+
+ if (bParam_mid) {
+ // Display the selected mid in an open state
+ let num_id = id.split('wall-item-content-').pop();
+ let b64mids = $('#thread-wrapper-' + num_id).data('b64mids');
+
+ if (b64mids.indexOf(bParam_mid) !== -1) {;
+ expanded_items.push(id);
+ }
+ }
+
+ let open = ((expanded_items.indexOf(id) === -1) ? false : true);
+
if(orgHeight > divmore_height) {
if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) {
$(this).readmore({