aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ThreadItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/ThreadItem.php')
-rw-r--r--Zotlabs/Lib/ThreadItem.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 120a34a19..a3e871810 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -174,6 +174,11 @@ class ThreadItem {
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
+ $my_responses = [];
+ foreach($response_verbs as $v) {
+ $my_responses[$v] = (($conv_responses[$v][$item['mid'] . '-m']) ? 1 : 0);
+ }
+
$like_count = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid']] : '');
$like_list = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid'] . '-l'] : '');
if (count($like_list) > MAX_LIKERS) {
@@ -381,6 +386,7 @@ class ThreadItem {
'list_unseen_txt' => $list_unseen_txt,
'markseen' => t('Mark all seen'),
'responses' => $responses,
+ 'my_responses' => $my_responses,
'like_count' => $like_count,
'like_list' => $like_list,
'like_list_part' => $like_list_part,
@@ -397,6 +403,7 @@ class ThreadItem {
'comment' => $this->get_comment_box($indent),
'previewing' => ($conv->is_preview() ? ' preview ' : ''),
'wait' => t('Please wait'),
+ 'submid' => substr($item['mid'],0,32),
'thread_level' => $thread_level
);
@@ -412,6 +419,12 @@ class ThreadItem {
if($visible_comments === false)
$visible_comments = 3;
+// 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) {
$result['children'][] = $child->get_template_data($conv_responses, $thread_level + 1);