diff --git a/CHANGELOG.md b/CHANGELOG.md index 03ca12fb0..c5e092279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ - Updated ContextMenu, add View Profile link. ([8544bcbd](https://github.com/pixelfed/pixelfed/commit/8544bcbd)) - Updated presenters, improve content warnings. ([86422c81](https://github.com/pixelfed/pixelfed/commit/86422c81)) - Updated Timeline.vue, increase pagination limit from 3 to 12 and add empty feed placeholder. ([916e8f71](https://github.com/pixelfed/pixelfed/commit/916e8f71)) +- Updated Timeline.vue, improve followed hashtags. ([728f10d7](https://github.com/pixelfed/pixelfed/commit/728f10d7)) - ([](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/Services/StatusHashtagService.php b/app/Services/StatusHashtagService.php index 497fe8642..6863c1d05 100644 --- a/app/Services/StatusHashtagService.php +++ b/app/Services/StatusHashtagService.php @@ -20,6 +20,9 @@ class StatusHashtagService { return []; } + $pid = request()->user() ? request()->user()->profile_id : false; + $filtered = $pid ? UserFilterService::filters($pid) : []; + return StatusHashtag::whereHashtagId($id) ->whereStatusVisibility('public') ->whereHas('media') @@ -30,10 +33,10 @@ class StatusHashtagService { ->map(function ($i, $k) use ($id) { return self::getStatus($i, $id); }) - ->filter(function ($i) { - return isset($i['status']) && !empty($i['status']); + ->filter(function ($i) use($filtered) { + return isset($i['status']) && !empty($i['status']) && !in_array($i['status']['account']['id'], $filtered); }) - ->all(); + ->values(); } public static function coldGet($id, $start = 0, $stop = 2000) diff --git a/public/js/timeline.js b/public/js/timeline.js index 5931abf2f..e4fcf0d60 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 5ed4cb8f4..736cb6dfa 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index fcfa244be..f926bff4e 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -55,16 +55,21 @@ -
-
- -
#{{hashtagPostsName}}
- +
+
+
+
+ +
+
+

You follow this hashtag. Learn more

-
+
-
+ @@ -196,85 +192,6 @@ v-for="(status, index) in discover_feed" :key="`discover_feed-${index}-${status.id}`"> -
-
-
Suggestions For You
- -
-
-
-
-
-

- - avatar - -

-
-

- - {{rec.username}} - -

-

{{rec.message}}

-
-

- Follow -

-
-
-
-
-
- - - { if(res.data.tags.length > 3) { this.showHashtagPosts = true; - this.hashtagPosts = res.data.tags.splice(0,3); + this.hashtagPosts = res.data.tags.splice(0,9); } }) })