1
0
Fork 0

Reshared data now is a link

This commit is contained in:
Michael 2020-09-09 04:49:42 +00:00
parent 42dcd6646e
commit 206caaf51a
4 changed files with 18 additions and 14 deletions

View file

@ -727,7 +727,12 @@ function conversation_fetch_comments($thread_items, $pinned) {
&& ($row['thr-parent'] == $row['parent-uri']) && ($row['received'] > $received)
&& Contact::isSharing($row['author-id'], $row['uid'])) {
$direction = ['direction' => 3, 'title' => DI::l10n()->t('%s reshared this.', $row['author-name'])];
$actor = ['link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']];
$author = ['uid' => 0, 'id' => $row['author-id'],
'network' => $row['author-network'], 'url' => $row['author-link']];
$url = '<a href="'. Contact::magicLinkByContact($author) .'">' . htmlentities($row['author-name']) . '</a>';
$actor = ['url' => $url, 'link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']];
$received = $row['received'];
}
@ -758,14 +763,16 @@ function conversation_fetch_comments($thread_items, $pinned) {
if (!empty($direction)) {
foreach ($parentlines as $line) {
$comments[$line]['direction'] = $direction;
$comments[$line]['reshared'] = DI::l10n()->t('%s reshared this.', $actor['name']);
if (!empty($actor) && DI::pConfig()->get(local_user(), 'system', 'display_resharer') ) {
if (!empty($actor)) {
$comments[$line]['reshared'] = DI::l10n()->t('%s reshared this.', $actor['url']);
if (DI::pConfig()->get(local_user(), 'system', 'display_resharer') ) {
$comments[$line]['owner-link'] = $actor['link'];
$comments[$line]['owner-avatar'] = $actor['avatar'];
$comments[$line]['owner-name'] = $actor['name'];
}
}
}
}
return $comments;
}

View file

@ -419,12 +419,6 @@ class Post
}
}
if (!empty($item['reshared'])) {
$reshared = $item['reshared'];
} else {
$reshared = '';
}
$tmp_item = [
'template' => $this->getTemplate(),
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
@ -503,7 +497,7 @@ class Post
'uriid' => $item['uri-id'],
'return' => (DI::args()->getCommand()) ? bin2hex(DI::args()->getCommand()) : '',
'direction' => $direction,
'reshared' => $reshared,
'reshared' => $item['reshared'] ?? '',
'delivery' => [
'queue_count' => $item['delivery_queue_count'],
'queue_done' => $item['delivery_queue_done'] + $item['delivery_queue_failed'], /// @todo Possibly display it separately in the future

View file

@ -20,6 +20,9 @@
<a name="{{$item.id}}" ></a>
<div class="wall-item-outside-wrapper {{$item.indent}}{{$item.previewing}}{{if $item.owner_url}} wallwall{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" >
<div class="wall-item-content-wrapper {{$item.indent}} {{$item.shiny}}" id="wall-item-content-wrapper-{{$item.id}}" >
{{if $item.reshared}}
<div class="wall-item-ammounce wall-item-responses" id="wall-item-ammounce-{{$item.id}}">{{$item.reshared nofilter}}</div>
{{/if}}
<div class="wall-item-info{{if $item.owner_url}} wallwall{{/if}}" id="wall-item-info-{{$item.id}}">
{{if $item.owner_url}}
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-{{$item.id}}" >

View file

@ -82,7 +82,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{/if}}
<div class="media {{$item.shiny}}">
{{if $item.reshared}}
<div class="wall-item-ammounce wall-item-responses" id="wall-item-ammounce-{{$item.id}}">{{$item.responses.announce.output nofilter}}</div>
<div class="wall-item-ammounce wall-item-responses" id="wall-item-ammounce-{{$item.id}}">{{$item.reshared nofilter}}</div>
{{/if}}
{{* The avatar picture and the photo-menu *}}
<div class="dropdown pull-left"><!-- Dropdown -->