aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/ThreadItem.php7
-rw-r--r--view/js/main.js6
2 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 2f5a0c325..a1e721dd7 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -412,8 +412,11 @@ class ThreadItem {
if($visible_comments === false)
$visible_comments = 3;
- if(in_array(\App::$module,['display','update_display']))
- $visible_comments = 99999;
+// needed for scroll to comment from notification but needs more work
+// as we do not want to open all comments unless there is actually an #item_xx anchor
+// and the url fragment is not sent to the server.
+// if(in_array(\App::$module,['display','update_display']))
+// $visible_comments = 99999;
if(($this->get_display_mode() === 'normal') && ($nb_children > 0)) {
foreach($children as $child) {
diff --git a/view/js/main.js b/view/js/main.js
index f415637bd..227f0b7fe 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -249,6 +249,7 @@ var divmore_height = 400;
var last_filestorage_id = null;
var mediaPlaying = false;
var contentHeightDiff = 0;
+var gotoAnchor = ((document.location.hash.includes('item_')) ? document.location.hash : '');
$(function() {
$.ajaxSetup({cache: false});
@@ -650,6 +651,11 @@ function updateConvItems(mode,data) {
collapseHeight();
}
+ if(gotoAnchor != '') {
+ document.location.hash = gotoAnchor;
+ gotoAnchor = '';
+ }
+
}
function collapseHeight() {