Merge pull request #14068 from annando/wall-read

Don't set posts to seen on channel ping
This commit is contained in:
Hypolite Petovan 2024-04-02 21:22:13 -04:00 committed by GitHub
commit c71f4eb1df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -378,6 +378,11 @@ class Network extends Timeline
}
}
protected function setPing(bool $ping)
{
$this->ping = $ping;
}
protected function getItems()
{
$conditionFields = ['uid' => $this->session->getLocalUserId()];

View file

@ -71,6 +71,8 @@ class Timeline extends BaseModule
/** @var bool */
protected $update;
/** @var bool */
protected $ping;
/** @var bool */
protected $raw;
/** @var string */
protected $order;
@ -823,7 +825,7 @@ class Timeline extends BaseModule
*/
protected function setItemsSeenByCondition(array $condition)
{
if (empty($condition)) {
if (empty($condition) || $this->ping) {
return;
}

View file

@ -46,6 +46,7 @@ class Network extends NetworkModule
System::httpExit('');
}
$this->setPing(true);
$this->itemsPerPage = 100;
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {