From 6c745c85226988bf4be4bb490c14c5134423168d Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 2 Nov 2022 20:45:42 -0400 Subject: [PATCH] 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 --- src/Module/Notifications/Ping.php | 5 +++++ 1 file changed, 5 insertions(+) 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'], -- 2.39.5