]> git.mxchange.org Git - friendica.git/commitdiff
Issue 9135: Display only reshared posts at the top
authorMichael <heluecht@pirati.ca>
Tue, 8 Sep 2020 22:06:10 +0000 (22:06 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 8 Sep 2020 22:06:10 +0000 (22:06 +0000)
include/conversation.php
src/Object/Post.php
view/theme/frio/css/style.css
view/theme/frio/templates/wall_thread.tpl

index 0baf4a819ef06f08b323e03f3ace6e44a4b8c9b5..93c7fb4061c8e7d1df13d204a2b746671e95476e 100644 (file)
@@ -758,6 +758,7 @@ 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')  ) {
                                $comments[$line]['owner-link'] = $actor['link'];
                                $comments[$line]['owner-avatar'] = $actor['avatar'];
index 0f2a0c65182e9adb445ac40b34ebf4d0e5857ddd..788fdedde689216de8f8545befd5c04ddcfbe46c 100644 (file)
@@ -419,6 +419,12 @@ class Post
                        }
                }
 
+               if (!empty($item['reshared'])) {
+                       $reshared = $item['reshared'];
+               } else {
+                       $reshared = '';
+               }
+
                $tmp_item = [
                        'template'        => $this->getTemplate(),
                        'type'            => implode("", array_slice(explode("/", $item['verb']), -1)),
@@ -497,6 +503,7 @@ class Post
                        'uriid'           => $item['uri-id'],
                        'return'          => (DI::args()->getCommand()) ? bin2hex(DI::args()->getCommand()) : '',
                        'direction'       => $direction,
+                       'reshared'        => $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
index 95e551f94c86bbb3e71b338850efd595383a5435..12aa1df8524a252c578fdf9116f873f5c75de32a 100644 (file)
@@ -1985,6 +1985,7 @@ ul.dropdown-menu li:hover {
 }
 
 /* Media Classes */
+.wall-item-ammounce,
 .media .time,
 .media .shared-time,
 .media .delivery,
index 6e8e013dcc23fabee9e642ccec41b1af053383fd..a4f980827a906e409df0e4dd66b82840ec2f4682 100644 (file)
@@ -81,7 +81,7 @@ as the value of $top_child_total (this is done at the end of this file)
 <span class="uriid" style="display: none;">{{$item.uriid}}</span>
 {{/if}}
        <div class="media {{$item.shiny}}">
-       {{if $item.responses.announce && $mode != 'display'}}
+       {{if $item.reshared}}
                <div class="wall-item-ammounce wall-item-responses" id="wall-item-ammounce-{{$item.id}}">{{$item.responses.announce.output nofilter}}</div>
        {{/if}}
                {{* The avatar picture and the photo-menu *}}
@@ -530,9 +530,7 @@ as the value of $top_child_total (this is done at the end of this file)
        {{if $item.responses}}
                <div class="wall-item-responses">
                        {{foreach $item.responses as $verb=>$response}}
-                               {{if $verb != 'announce' || $mode == 'display'}}
                        <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output nofilter}}</div>
-                               {{/if}}
                        {{/foreach}}
                </div>
        {{/if}}