]> git.mxchange.org Git - friendica.git/commitdiff
Only show the difference between posting and receive date when there is a difference
authorMichael <heluecht@pirati.ca>
Tue, 3 Dec 2019 07:23:01 +0000 (07:23 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 3 Dec 2019 07:23:01 +0000 (07:23 +0000)
src/Object/Post.php

index 5dbcfeeedec7ce7d482844abc3dd09082d8c79f6..2c4e841acbdd5592e58e72c416e63381d14f0a4f 100644 (file)
@@ -379,8 +379,9 @@ class Post extends BaseObject
                $tags = Term::populateTagsFromItem($item);
 
                $ago = Temporal::getRelativeDate($item['created']);
-               if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds'))) {
-                       $ago = L10n::t('%s (Received %s)', $ago, Temporal::getRelativeDate($item['received']));
+               $ago_received = Temporal::getRelativeDate($item['received']);
+               if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
+                       $ago = L10n::t('%s (Received %s)', $ago, $ago_received);
                }
 
                $tmp_item = [