diff --git a/CHANGELOG.md b/CHANGELOG.md index cf294eb62..dec9e87f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,12 +9,15 @@ - Added Hovercards ([16ced7b4](https://github.com/pixelfed/pixelfed/commit/16ced7b4)) - Fix word-break on statuses ([16ced7b4](https://github.com/pixelfed/pixelfed/commit/16ced7b4)) - Add pronouns to hovercards ([33f863e8](https://github.com/pixelfed/pixelfed/commit/33f863e8)) +- Improved onboarding ([042c5b6c](https://github.com/pixelfed/pixelfed/commit/042c5b6c)) ### Updated - Updated MediaStorageService, fix remote avatar bug. ([1c20d696](https://github.com/pixelfed/pixelfed/commit/1c20d696)) - Updated WebfingerService. Fixes #3167. ([aff74566](https://github.com/pixelfed/pixelfed/commit/aff74566)) - Updated ComposeModal, add max file size and allowed mime types. Fixes #3162. ([879281cc](https://github.com/pixelfed/pixelfed/commit/879281cc)) - Updated profile embeds, fix NaN bug and improve performance. ([3bd211d7](https://github.com/pixelfed/pixelfed/commit/3bd211d7)) +- Updated ApiV1Controller, improve follow count cache invalidation. ([4b6effb9](https://github.com/pixelfed/pixelfed/commit/4b6effb9)) +- ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index bd8ca8c45..987878970 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -662,6 +662,8 @@ class ApiV1Controller extends Controller Cache::forget('profile:follower_count:'.$user->profile_id); Cache::forget('profile:following_count:'.$target->id); Cache::forget('profile:following_count:'.$user->profile_id); + AccountService::del($user->profile_id); + AccountService::del($target->id); $res = RelationshipService::get($user->profile_id, $target->id); @@ -685,7 +687,6 @@ class ApiV1Controller extends Controller ->whereNull('status') ->findOrFail($id); - $private = (bool) $target->is_private; $remote = (bool) $target->domain; @@ -705,6 +706,8 @@ class ApiV1Controller extends Controller abort(400, 'You can only follow or unfollow ' . Follower::FOLLOW_PER_HOUR . ' users per hour'); } + $user->profile->decrement('following_count'); + FollowRequest::whereFollowerId($user->profile_id) ->whereFollowingId($target->id) ->delete(); @@ -725,6 +728,12 @@ class ApiV1Controller extends Controller Cache::forget('api:local:exp:rec:'.$user->profile_id); Cache::forget('user:account:id:'.$target->user_id); Cache::forget('user:account:id:'.$user->id); + Cache::forget('profile:follower_count:'.$target->id); + Cache::forget('profile:follower_count:'.$user->profile_id); + Cache::forget('profile:following_count:'.$target->id); + Cache::forget('profile:following_count:'.$user->profile_id); + AccountService::del($user->profile_id); + AccountService::del($target->id); $res = RelationshipService::get($user->profile_id, $target->id); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 7e755ca13..899c3a6be 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -27,7 +27,7 @@ class LoginController extends Controller * * @var string */ - protected $redirectTo = '/'; + protected $redirectTo = '/i/web'; protected $maxAttempts = 5; protected $decayMinutes = 60; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index fe9aa7fde..ff0e647ae 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -32,7 +32,7 @@ class RegisterController extends Controller * * @var string */ - protected $redirectTo = '/'; + protected $redirectTo = '/i/web'; /** * Create a new controller instance. diff --git a/public/_lang/en.json b/public/_lang/en.json index b6c4fccc1..bad011304 100644 Binary files a/public/_lang/en.json and b/public/_lang/en.json differ diff --git a/public/js/spa.js b/public/js/spa.js index a32473b1a..fbb8a1693 100644 Binary files a/public/js/spa.js and b/public/js/spa.js differ diff --git a/public/js/timeline.js b/public/js/timeline.js index 492d4c7f3..159aeab36 100644 Binary files a/public/js/timeline.js and b/public/js/timeline.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 9e81fd1ae..166d0b086 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/i18n/en.json b/resources/assets/js/i18n/en.json index b6c4fccc1..bad011304 100644 --- a/resources/assets/js/i18n/en.json +++ b/resources/assets/js/i18n/en.json @@ -77,7 +77,8 @@ "groupPost": "group post", "modlog": "modlog", "post": "post", - "story": "story" + "story": "story", + "noneFound": "No notifications found" }, "post": { "shareToFollowers": "Share to followers", @@ -146,7 +147,13 @@ "add": "Add Story" }, "timeline": { - "peopleYouMayKnow": "People you may know" + "peopleYouMayKnow": "People you may know", + "onboarding": { + "welcome": "Welcome", + "thisIsYourHomeFeed": "This is your home feed, a chronological feed of posts from accounts you follow.", + "letUsHelpYouFind": "Let us help you find some interesting people to follow", + "refreshFeed": "Refresh my feed" + } }, "hashtags": { "emptyFeed": "We can't seem to find any posts for this hashtag" diff --git a/resources/lang/en/web.php b/resources/lang/en/web.php index f5fa10b95..7cb5fa0e9 100644 --- a/resources/lang/en/web.php +++ b/resources/lang/en/web.php @@ -101,6 +101,7 @@ return [ 'modlog' => 'modlog', 'post' => 'post', 'story' => 'story', + 'noneFound' => 'No notifications found', ], 'post' => [ @@ -180,7 +181,14 @@ return [ ], 'timeline' => [ - 'peopleYouMayKnow' => 'People you may know' + 'peopleYouMayKnow' => 'People you may know', + + 'onboarding' => [ + 'welcome' => 'Welcome', + 'thisIsYourHomeFeed' => 'This is your home feed, a chronological feed of posts from accounts you follow.', + 'letUsHelpYouFind' => 'Let us help you find some interesting people to follow', + 'refreshFeed' => 'Refresh my feed', + ], ], 'hashtags' => [