From f47161fcd9115c7bc5313baabd8c837ab3a5f8a6 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 May 2021 22:16:35 -0600 Subject: [PATCH 1/5] Update StatusDeletePipeline --- app/Jobs/StatusPipeline/StatusDelete.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index 5202d79cf..f78d9b009 100644 --- a/app/Jobs/StatusPipeline/StatusDelete.php +++ b/app/Jobs/StatusPipeline/StatusDelete.php @@ -11,7 +11,6 @@ use App\{ Status, StatusHashtag, }; -use App\Models\StatusVideo; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -119,7 +118,6 @@ class StatusDelete implements ShouldQueue ->forceDelete(); $tag->delete(); }); - StatusVideo::whereStatusId($status->id)->delete(); AccountInterstitial::where('item_type', 'App\Status') ->where('item_id', $status->id) ->delete(); From 4408e2ef8c3cd2980a74041fb787451648143c1c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 May 2021 22:18:00 -0600 Subject: [PATCH 2/5] Update LikeService, show like count to status owner --- app/Services/LikeService.php | 9 ++++++++- resources/assets/js/components/Timeline.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Services/LikeService.php b/app/Services/LikeService.php index 36f31ee44..a1bdeb55f 100644 --- a/app/Services/LikeService.php +++ b/app/Services/LikeService.php @@ -71,9 +71,16 @@ class LikeService { $id = $like->profile_id; - return [ + $res = [ 'username' => ProfileService::get($id)['username'], 'others' => $status->likes_count >= 5, ]; + + if(request()->user()->profile_id == $status->profile_id) { + $res['total_count'] = $status->likes_count; + $res['total_count_pretty'] = number_format($res['total_count']); + } + + return $res; } } diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index ca5a3b8b5..fc7b387a0 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -228,7 +228,7 @@ From 04094baaefb2401674ebf9e8ea82590b21b7b7c5 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 May 2021 22:20:46 -0600 Subject: [PATCH 3/5] Update PostComponent, show like count to status owner --- resources/assets/js/components/PostComponent.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index f40730cf8..61762bac7 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -225,7 +225,7 @@ From de117050c377801ae8fe318f37a8928f894889a4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 May 2021 22:21:07 -0600 Subject: [PATCH 4/5] Update compiled assets --- public/js/status.js | Bin 121381 -> 121485 bytes public/js/timeline.js | Bin 176553 -> 176685 bytes public/mix-manifest.json | Bin 2083 -> 2083 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/js/status.js b/public/js/status.js index 41f016c5d6f0f7004b4b7252fa7ef3b47c11b974..7a1be09d9f90a3d94c90967850e74dbc0d060349 100644 GIT binary patch delta 805 zcmZ3wg}rwx`vhxN!|)1MrRfd5jFyv+)=F|18=0D?nx|Pzepc&=;F#B`AUMxzH7EDf zNh1W-*O{;wc@^YNUr@y;zcEgob@LWh$6#v@+p_%36a@oCTiYx(wJe<~+f2Qp)PkJE z|(rn>1HQ_p8lLI3~4GIxPg{i59 z>39Q;Do#x-O3v^vC@I#7M3~`iUtMeEJ$YK>Ln#lPl8nq^Oe<}jCQpoVWh|WhAyRDe z+b9l3kImnr<}flwZk`;Y%nYQq$6u7){G^V_o3Apvs8UH&CsRWy$RMqJ^Out=ZM2I^ z5=%;p^>Q+^Q&ZxTD)mb8OA>S9lk-dSO5zKOQcFrI?Sblx3lj5`rax$86vd}fQ!`f6 zszfh7RYOw;NR??QDQsWJ#<(I09=O{BGZ`yHwwKf~2J$f{2N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VVIPfW@?#|Jbku4Qxt;tSD(oZ!Sgm? zdWPUx8Zt#AcykPyiV!?8BPKUan3=KD*PAklPp>gzNTM8( delta 56 zcmZ21uvlP&A-jmFc~WY!p_zG#L29zGfl-=~d6MB|SN7xLhH0j01}2G#7KX-VX2vFo L$z~QxT(w*P%cKue From 73d9799a382f204f20baaae8ff70ab6b9cb01fc9 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 12 May 2021 22:21:22 -0600 Subject: [PATCH 5/5] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0528e5938..57e3954ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ - Updated Timeline component, change like logic. ([7bcbf96b](https://github.com/pixelfed/pixelfed/commit/7bcbf96b)) - Updated LikeService, fix likedBy method. ([a5e64da6](https://github.com/pixelfed/pixelfed/commit/a5e64da6)) - Updated PublicApiController, increase public timeline to 6 months from 3. ([8a736432](https://github.com/pixelfed/pixelfed/commit/8a736432)) +- Updated LikeService, show like count to status owner. ([4408e2ef](https://github.com/pixelfed/pixelfed/commit/4408e2ef)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10)