Browse Source

Fix timeline infinite scroll

Daniel Supernault 3 năm trước cách đây
mục cha
commit
03a85460af
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      app/Http/Controllers/PublicApiController.php

+ 2 - 0
app/Http/Controllers/PublicApiController.php

@@ -401,6 +401,7 @@ class PublicApiController extends Controller
             }
 
             $res = collect($feed)
+            ->take($limit)
             ->map(function($k) use($user) {
                 $status = StatusService::get($k);
                 if($status && isset($status['account']) && $user) {
@@ -680,6 +681,7 @@ class PublicApiController extends Controller
             }
 
             $res = collect($feed)
+            ->take($limit)
             ->map(function($k) use($user) {
                 $status = StatusService::get($k);
                 if($status && isset($status['account']) && $user) {