diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec73b612a..c7747a7fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -31,6 +31,9 @@
- Updated NetworkTimeline, fix remote comment urls. ([308acc91](https://github.com/pixelfed/pixelfed/commit/308acc91))
- Updated Timeline component, abstracted reusable partials. ([858f3f9e](https://github.com/pixelfed/pixelfed/commit/858f3f9e))
- Updated Timeline, fix suggested posts. ([3ba5c88c](https://github.com/pixelfed/pixelfed/commit/3ba5c88c))
+- Updated Timeline, disable new post update checker and hide reaction bar on network timeline. ([1e3d3a69](https://github.com/pixelfed/pixelfed/commit/1e3d3a69))
+- Updated PublicApiController, improve network timeline perf. ([e5f683fd](https://github.com/pixelfed/pixelfed/commit/e5f683fd))
+- Updated Network Timeline, use existing Timeline component. ([0deaafc0](https://github.com/pixelfed/pixelfed/commit/0deaafc0))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)
diff --git a/app/Http/Controllers/PublicApiController.php b/app/Http/Controllers/PublicApiController.php
index a6a44a525..2eafe7044 100644
--- a/app/Http/Controllers/PublicApiController.php
+++ b/app/Http/Controllers/PublicApiController.php
@@ -15,7 +15,7 @@ use App\{
StatusView,
UserFilter
};
-use Auth,Cache;
+use Auth, Cache;
use Carbon\Carbon;
use League\Fractal;
use App\Transformer\Api\{
@@ -27,6 +27,8 @@ use App\Transformer\Api\{
use App\Services\{
AccountService,
PublicTimelineService,
+ StatusService,
+ SnowflakeService,
UserFilterService
};
use App\Jobs\StatusPipeline\NewStatusPipeline;
@@ -498,6 +500,7 @@ class PublicApiController extends Controller
$max = $request->input('max_id');
$limit = $request->input('limit') ?? 3;
$user = $request->user();
+ $amin = SnowflakeService::byDate(now()->subDays(90));
$key = 'user:last_active_at:id:'.$user->id;
$ttl = now()->addMinutes(5);
@@ -513,61 +516,41 @@ class PublicApiController extends Controller
$timeline = Status::select(
'id',
'uri',
- 'caption',
- 'rendered',
- 'profile_id',
'type',
- 'in_reply_to_id',
- 'reblog_of_id',
- 'is_nsfw',
'scope',
- 'local',
- 'reply_count',
- 'comments_disabled',
- 'place_id',
- 'likes_count',
- 'reblogs_count',
'created_at',
- 'updated_at'
)->where('id', $dir, $id)
->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
->whereNotNull('uri')
->whereScope('public')
- ->where('created_at', '>', now()->subMonths(3))
+ ->where('id', '>', $amin)
->orderBy('created_at', 'desc')
->limit($limit)
- ->get();
+ ->get()
+ ->map(function($s) {
+ return StatusService::get($s->id);
+ });
+ $res = $timeline->toArray();
} else {
- $timeline = Status::select(
- 'id',
- 'uri',
- 'caption',
- 'rendered',
- 'profile_id',
- 'type',
- 'in_reply_to_id',
- 'reblog_of_id',
- 'is_nsfw',
- 'scope',
- 'local',
- 'reply_count',
- 'comments_disabled',
- 'created_at',
- 'place_id',
- 'likes_count',
- 'reblogs_count',
- 'updated_at'
- )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
- ->with('profile', 'hashtags', 'mentions')
- ->whereNotNull('uri')
- ->whereScope('public')
- ->where('created_at', '>', now()->subMonths(3))
- ->orderBy('created_at', 'desc')
- ->simplePaginate($limit);
+ $timeline = Status::select(
+ 'id',
+ 'uri',
+ 'type',
+ 'scope',
+ 'created_at',
+ )->whereIn('type', ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])
+ ->whereNotNull('uri')
+ ->whereScope('public')
+ ->where('id', '>', $amin)
+ ->orderBy('created_at', 'desc')
+ ->limit($limit)
+ ->get()
+ ->map(function($s) {
+ return StatusService::get($s->id);
+ });
+ $res = $timeline->toArray();
}
- $fractal = new Fractal\Resource\Collection($timeline, new StatusTransformer());
- $res = $this->fractal->createData($fractal)->toArray();
return response()->json($res);
}
diff --git a/public/js/network-timeline.js b/public/js/network-timeline.js
deleted file mode 100644
index d8d8cac0d..000000000
Binary files a/public/js/network-timeline.js and /dev/null differ
diff --git a/public/js/profile-directory.js b/public/js/profile-directory.js
index ec442eacf..78d265d64 100644
Binary files a/public/js/profile-directory.js and b/public/js/profile-directory.js differ
diff --git a/public/js/profile.js b/public/js/profile.js
index 8805d6973..18f9c2e78 100644
Binary files a/public/js/profile.js and b/public/js/profile.js differ
diff --git a/public/js/quill.js b/public/js/quill.js
index d18b5786f..c729e43a2 100644
Binary files a/public/js/quill.js and b/public/js/quill.js differ
diff --git a/public/js/rempos.js b/public/js/rempos.js
index c3fce86a4..93fd6fa7c 100644
Binary files a/public/js/rempos.js and b/public/js/rempos.js differ
diff --git a/public/js/rempro.js b/public/js/rempro.js
index 74e5c8008..0bad41ba4 100644
Binary files a/public/js/rempro.js and b/public/js/rempro.js differ
diff --git a/public/js/search.js b/public/js/search.js
index 1a4fb5a00..fc8e92345 100644
Binary files a/public/js/search.js and b/public/js/search.js differ
diff --git a/public/js/status.js b/public/js/status.js
index 6eded60ea..63b0e7e36 100644
Binary files a/public/js/status.js and b/public/js/status.js differ
diff --git a/public/js/story-compose.js b/public/js/story-compose.js
index c3361d98c..84256a502 100644
Binary files a/public/js/story-compose.js and b/public/js/story-compose.js differ
diff --git a/public/js/theme-monokai.js b/public/js/theme-monokai.js
index 37080367b..88f12f95b 100644
Binary files a/public/js/theme-monokai.js and b/public/js/theme-monokai.js differ
diff --git a/public/js/timeline.js b/public/js/timeline.js
index 8428a86ca..98a560970 100644
Binary files a/public/js/timeline.js and b/public/js/timeline.js differ
diff --git a/public/js/vendor.js b/public/js/vendor.js
index 70d7fe465..f43c3454e 100644
Binary files a/public/js/vendor.js and b/public/js/vendor.js differ
diff --git a/public/mix-manifest.json b/public/mix-manifest.json
index f7ab36385..1bbf03443 100644
Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ
diff --git a/resources/assets/js/components/NetworkTimeline.vue b/resources/assets/js/components/NetworkTimeline.vue
deleted file mode 100644
index d8dd685b7..000000000
--- a/resources/assets/js/components/NetworkTimeline.vue
+++ /dev/null
@@ -1,2197 +0,0 @@
-
-
-
- Error: Problem rendering preview.
-
-
- For information about COVID-19, {{config.features.label.covid.org}}
-
-
-
-
- Hello, {{profile.acct}}
- Start following people to build your timeline. {{profile.username || 'loading...'}} {{profile.display_name || 'loading...'}} Comments
-
-
-
- No comments yet
-
-
-
-
-
- The network timeline may contain unmoderated and/or NSFW content from other servers. View the timeline documentation for more info.Suggestions For You
-
- #{{hashtagPostsName}}
-
-
-
- - {{s.account.username}} - - - - - - -
-- - {{s.favourites_count == 1 ? '1 like' : s.favourites_count + ' likes'}} -
-