mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 14:34:32 +02:00
Decouple conversation creation from rendering
- This allows to separately obtain a list of threads for rendering without having to deal with an already-formed HTML output
This commit is contained in:
parent
31fbe70ec7
commit
706444bdb2
14 changed files with 294 additions and 269 deletions
|
@ -40,7 +40,7 @@ class Community extends CommunityModule
|
|||
|
||||
$o = '';
|
||||
if (!empty($request['force'])) {
|
||||
$o = DI::conversation()->create(self::getItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
|
||||
$o = DI::conversation()->render(self::getItems(), Conversation::MODE_COMMUNITY, true, false, 'commented', DI::userSession()->getLocalUserId());
|
||||
}
|
||||
|
||||
System::htmlUpdateExit($o);
|
||||
|
|
|
@ -79,7 +79,7 @@ class Network extends NetworkModule
|
|||
$ordering = '`commented`';
|
||||
}
|
||||
|
||||
$o = DI::conversation()->create($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, DI::userSession()->getLocalUserId());
|
||||
$o = DI::conversation()->render($items, Conversation::MODE_NETWORK, $profile_uid, false, $ordering, DI::userSession()->getLocalUserId());
|
||||
|
||||
System::htmlUpdateExit($o);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class Profile extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
$o .= DI::conversation()->create($items, Conversation::MODE_PROFILE, $a->getProfileOwner(), false, 'received', $a->getProfileOwner());
|
||||
$o .= DI::conversation()->render($items, Conversation::MODE_PROFILE, $a->getProfileOwner(), false, 'received', $a->getProfileOwner());
|
||||
|
||||
System::htmlUpdateExit($o);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue