mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 05:23:17 +00:00
Merge pull request #204 from dansup/frontend-ui-refactor
Update ProfileController
This commit is contained in:
commit
0b8bd6b4d3
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ class ProfileController extends Controller
|
||||||
|
|
||||||
// TODO: refactor this mess
|
// TODO: refactor this mess
|
||||||
$owner = Auth::check() && Auth::id() === $user->user_id;
|
$owner = Auth::check() && Auth::id() === $user->user_id;
|
||||||
$following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
|
$is_following = ($owner == false && Auth::check()) ? $user->followedBy(Auth::user()->profile) : false;
|
||||||
$timeline = $user->statuses()
|
$timeline = $user->statuses()
|
||||||
->whereHas('media')
|
->whereHas('media')
|
||||||
->whereNull('in_reply_to_id')
|
->whereNull('in_reply_to_id')
|
||||||
|
@ -39,7 +39,7 @@ class ProfileController extends Controller
|
||||||
->withCount(['comments', 'likes'])
|
->withCount(['comments', 'likes'])
|
||||||
->simplePaginate(21);
|
->simplePaginate(21);
|
||||||
|
|
||||||
return view('profile.show', compact('user', 'owner', 'following', 'timeline'));
|
return view('profile.show', compact('user', 'owner', 'is_following', 'timeline'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showActivityPub(Request $request, $user)
|
public function showActivityPub(Request $request, $user)
|
||||||
|
|
Loading…
Reference in a new issue