From febb64c897468139551599a80dbe06db42097e6d Mon Sep 17 00:00:00 2001 From: Cyrille Bollu Date: Sat, 20 Jul 2019 18:47:38 +0200 Subject: Adds a menu entry for a liked timeline Signed-off-by: Cyrille Bollu --- src/App.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App.vue b/src/App.vue index f70a58e6..ea008365 100644 --- a/src/App.vue +++ b/src/App.vue @@ -156,6 +156,16 @@ export default { params: { account: this.currentUser.uid } } }, + { + id: 'social-liked', + classes: [], + icon: 'icon-favorite', + text: t('social', 'Liked'), + router: { + name: 'timeline', + params: { type: 'liked' } + } + }, { id: 'social-local', classes: [], -- cgit v1.2.3 From 92ba1df1131c569e6dd772c9c44623f301ed3a84 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Sat, 20 Jul 2019 18:21:26 -0100 Subject: returns stream actions on liked timeline Signed-off-by: Maxence Lange --- lib/Db/StreamRequest.php | 3 ++- lib/Service/NoteService.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Db/StreamRequest.php b/lib/Db/StreamRequest.php index 365d83f5..db2dee29 100644 --- a/lib/Db/StreamRequest.php +++ b/lib/Db/StreamRequest.php @@ -518,12 +518,13 @@ class StreamRequest extends StreamRequestBuilder { * @return array * @throws Exception */ - public function getLiked(int $since = 0, int $limit = 5, bool $localOnly = true): array { + public function getTimelineLiked(int $since = 0, int $limit = 5, bool $localOnly = true): array { $qb = $this->getStreamSelectSql(); $this->limitPaginate($qb, $since, $limit); $this->limitToType($qb, Note::TYPE); + $this->leftJoinStreamAction($qb); $this->leftJoinCacheActors($qb, 'attributed_to'); $this->leftJoinActions($qb, Like::TYPE); $this->filterDBField($qb, 'id', '', false, 'a'); diff --git a/lib/Service/NoteService.php b/lib/Service/NoteService.php index b9043175..f13ffee8 100644 --- a/lib/Service/NoteService.php +++ b/lib/Service/NoteService.php @@ -464,7 +464,7 @@ class NoteService { * @throws Exception */ public function getStreamLiked(int $since = 0, int $limit = 5): array { - return $this->streamRequest->getLiked($since, $limit); + return $this->streamRequest->getTimelineLiked($since, $limit); } -- cgit v1.2.3