Update timeline logic to sort by date instead of id

This commit is contained in:
Daniel Supernault 2018-09-11 20:55:19 -06:00
parent 7f73b1ae6b
commit 197829224e
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ class SiteController extends Controller
->whereNotIn('profile_id', $filtered)
->whereHas('media')
->whereVisibility('public')
->orderBy('id', 'desc')
->orderBy('created_at', 'desc')
->withCount(['comments', 'likes', 'shares'])
->simplePaginate(20);
$type = 'personal';

View File

@ -28,7 +28,7 @@ class TimelineController extends Controller
->pluck('filterable_id');
$timeline = Status::whereIn('profile_id', $following)
->whereNotIn('profile_id', $filtered)
->orderBy('id', 'desc')
->orderBy('created_at', 'desc')
->withCount(['comments', 'likes'])
->simplePaginate(20);
$type = 'personal';
@ -54,7 +54,7 @@ class TimelineController extends Controller
->whereNull('reblog_of_id')
->whereVisibility('public')
->withCount(['comments', 'likes'])
->orderBy('id', 'desc')
->orderBy('created_at', 'desc')
->simplePaginate(20);
$type = 'local';