@@ -60,7 +60,7 @@ public function fillWithParentPost(QueryResult $result): array
6060 ->map (fn (ReplyKey $ postKey ) => $ postKey ->parentPostId )
6161 ->concat ($ result ->subReplies ->map (fn (SubReplyKey $ postKey ) => $ postKey ->tid ))
6262 ->unique ();
63- $ this ->threads = collect ($ postModels ['thread ' ]->getPosts ($ fid , $ parentThreadsID ->concat ($ tids )))
63+ $ this ->threads = collect ($ postModels ['thread ' ]->getPosts ($ parentThreadsID ->concat ($ tids )))
6464 ->map (fn (\App \Entity \Post \Thread $ entity ) => Thread::fromEntity ($ entity ))
6565 ->each (static fn (Thread $ thread ) =>
6666 $ thread ->setIsMatchQuery ($ tids ->contains ($ thread ->getTid ())));
@@ -70,14 +70,14 @@ public function fillWithParentPost(QueryResult $result): array
7070 /** @var Collection<int, int> $parentRepliesID parent pid of all sub replies */
7171 $ parentRepliesID = $ result ->subReplies ->map (fn (SubReplyKey $ postKey ) => $ postKey ->parentPostId )->unique ();
7272 $ allRepliesId = $ parentRepliesID ->concat ($ pids );
73- $ this ->replies = collect ($ postModels ['reply ' ]->getPosts ($ fid , $ allRepliesId ))
73+ $ this ->replies = collect ($ postModels ['reply ' ]->getPosts ($ allRepliesId ))
7474 ->map (fn (\App \Entity \Post \Reply $ entity ) => Reply::fromEntity ($ entity ))
7575 ->each (static fn (Reply $ reply ) =>
7676 $ reply ->setIsMatchQuery ($ pids ->contains ($ reply ->getPid ())));
7777 $ this ->stopwatch ->stop ('fillWithRepliesFields ' );
7878
7979 $ this ->stopwatch ->start ('fillWithSubRepliesFields ' );
80- $ this ->subReplies = collect ($ postModels ['subReply ' ]->getPosts ($ fid , $ spids ))
80+ $ this ->subReplies = collect ($ postModels ['subReply ' ]->getPosts ($ spids ))
8181 ->map (fn (\App \Entity \Post \SubReply $ entity ) => SubReply::fromEntity ($ entity ));
8282 $ this ->stopwatch ->stop ('fillWithSubRepliesFields ' );
8383
0 commit comments