[PLUGINS][TreeNotes] Feed only shows each note and its respective direct

replies, conversation shows whole tree

[COMPONENTS][Feed] Added request to FormatNoteList event

Every single Note that was provided to FeedController::postProcess is
shown. This means, that even though the Feed is formatted to show only a
Note and its respective direct replies, those same replies are shown
individually again (and they get the chance to show their own direct
replies).

The Note list provided to FormatNoteList is reversed, and for every
index, the respective Note replies are filtered out of the original list.
The replies are then added as leafs of the current Note and added to the tree.
This commit is contained in:
2021-12-31 23:26:39 +00:00
parent f6311debbf
commit e7940a21ee
6 changed files with 59 additions and 17 deletions

View File

@@ -49,7 +49,7 @@ class Reply extends FeedController
*
* @return array
*/
public function addReply(Request $request, int $note_id, int $actor_id)
public function addReply(Request $request, int $note_id)
{
$user = Common::ensureLoggedIn();