From 555856208ebbf09ce99333ffe118c6b145e4ae57 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 9 Sep 2020 16:54:18 +0000 Subject: [PATCH] Issue 9167: Adding more direction indicators --- include/conversation.php | 14 ++++++++------ view/theme/frio/templates/sub/direction.tpl | 4 ++++ view/theme/vier/templates/sub/direction.tpl | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 1d374c5ca9..9af80e168b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -741,13 +741,15 @@ function conversation_fetch_comments($thread_items, $pinned) { $direction = ['direction' => 5, 'title' => DI::l10n()->t('%s commented on this.', $row['author-name'])]; } - if (($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && ($row['author-id'] == $row['owner-id']) - && !Contact::isSharing($row['author-id'], $row['uid'])) { - if ($row['post-type'] == Item::PT_TAG) { - $row['direction'] = ['direction' => 4, 'title' => DI::l10n()->t('Tagged')]; + if (($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && ($row['author-id'] == $row['owner-id'])) { + if (!Contact::isSharing($row['author-id'], $row['uid'])) { + if ($row['post-type'] == Item::PT_TAG) { + $row['direction'] = ['direction' => 4, 'title' => DI::l10n()->t('Tagged')]; + } + $parentlines[] = $lineno; + } else { + $row['direction'] = ['direction' => 6, 'title' => DI::l10n()->t('You are following %s.', $row['author-name'])]; } - - $parentlines[] = $lineno; } if ($row['gravity'] == GRAVITY_PARENT) { diff --git a/view/theme/frio/templates/sub/direction.tpl b/view/theme/frio/templates/sub/direction.tpl index 671272cd00..abcd517974 100644 --- a/view/theme/frio/templates/sub/direction.tpl +++ b/view/theme/frio/templates/sub/direction.tpl @@ -11,6 +11,10 @@ {{elseif $direction.direction == 5}} + {{elseif $direction.direction == 6}} + + {{elseif $direction.direction == 7}} + {{/if}} {{/if}} diff --git a/view/theme/vier/templates/sub/direction.tpl b/view/theme/vier/templates/sub/direction.tpl index 08f40c3a3b..939623c1e2 100644 --- a/view/theme/vier/templates/sub/direction.tpl +++ b/view/theme/vier/templates/sub/direction.tpl @@ -11,6 +11,10 @@ {{elseif $direction.direction == 5}} + {{elseif $direction.direction == 6}} + + {{elseif $direction.direction == 7}} + {{/if}} {{/if}}