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
This commit is contained in:
Hypolite Petovan 2022-11-02 20:45:42 -04:00
parent 8092bfe277
commit 6c745c8522

View file

@ -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'],