Network, Channels and Community are children of timeline

This commit is contained in:
Michael 2023-09-09 09:14:36 +00:00
parent 41919bdaea
commit 013aee01f5
14 changed files with 875 additions and 762 deletions

View file

@ -38,7 +38,13 @@ class Channel extends ChannelModule
$o = '';
if (!empty($request['force'])) {
$o = $this->conversation->render($this->getItems($request), Conversation::MODE_CHANNEL, true, false, 'created', $this->session->getLocalUserId());
if ($this->timeline->isChannel(self::$selectedTab)) {
$items = $this->getChannelItems();
} else {
$items = $this->getCommunityItems();
}
$o = $this->conversation->render($items, Conversation::MODE_CHANNEL, true, false, 'created', $this->session->getLocalUserId());
}
System::htmlUpdateExit($o);

View file

@ -36,11 +36,11 @@ class Community extends CommunityModule
{
protected function rawContent(array $request = [])
{
$this->parseRequest();
$this->parseRequest($request);
$o = '';
if (!empty($request['force'])) {
$o = DI::conversation()->render(self::getItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
$o = DI::conversation()->render($this->getCommunityItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
}
System::htmlUpdateExit($o);

View file

@ -23,7 +23,6 @@ namespace Friendica\Module\Update;
use Friendica\Content\Conversation;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Module\Conversation\Network as NetworkModule;
@ -69,7 +68,7 @@ class Network extends NetworkModule
$params = ['limit' => 100];
$table = 'network-item-view';
$items = self::getItems($table, $params, $conditionFields);
$items = $this->getItems($table, $params, $conditionFields);
if (self::$order === 'received') {
$ordering = '`received`';
@ -79,7 +78,7 @@ class Network extends NetworkModule
$ordering = '`commented`';
}
$o = DI::conversation()->render($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, DI::userSession()->getLocalUserId());
$o = $this->conversation->render($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, $this->session->getLocalUserId());
System::htmlUpdateExit($o);
}