From: Hypolite Petovan Date: Thu, 3 Nov 2022 00:45:42 +0000 (-0400) Subject: Remove non-top-level posts from notification labels when network sort order is "received" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6c745c85226988bf4be4bb490c14c5134423168d;p=friendica.git Remove non-top-level posts from notification labels when network sort order is "received" - These posts don't alter the network view in this sort order and so are distracting with no actionable benefits --- diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index 2d91105700..e80d3b8ee0 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -128,6 +128,11 @@ class Ping extends BaseModule $this->session->getLocalUserId(), Verb::getID(Activity::FOLLOW) ]; + // No point showing counts for non-top-level posts when the network page is ordered by received field + if (Network::getTimelineOrderBySession($this->session, $this->pconfig) == 'received') { + $condition = DBA::mergeConditions($condition, ["`parent` = `id`"]); + } + $items_unseen = $this->database->toArray(Post::selectForUser( $this->session->getLocalUserId(), ['wall', 'uid', 'uri-id'],