diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/TimelineList.vue | 4 | ||||
-rw-r--r-- | src/store/timeline.js | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/components/TimelineList.vue b/src/components/TimelineList.vue index b4c39e75..9fb2034b 100644 --- a/src/components/TimelineList.vue +++ b/src/components/TimelineList.vue @@ -97,6 +97,10 @@ export default { title: t('social', 'No global posts found'), description: t('social', 'Posts from federated instances will show up here') }, + liked: { + image: 'img/undraw/profile.svg', + title: t('social', 'No liked posts found') + } tags: { image: 'img/undraw/profile.svg', title: t('social', 'No posts found for this tag') diff --git a/src/store/timeline.js b/src/store/timeline.js index 3146a194..978154b0 100644 --- a/src/store/timeline.js +++ b/src/store/timeline.js @@ -133,8 +133,6 @@ const actions = { return new Promise((resolve, reject) => { axios.post(OC.generateUrl(`apps/social/api/v1/post/like?postId=${post.id}`)).then((response) => { context.commit('likePost', { post, parentAnnounce }) - // eslint-disable-next-line no-console - console.log('Post liked with token ' + response.data.result.token) resolve(response) }).catch((error) => { OC.Notification.showTemporary('Failed to like post') @@ -146,8 +144,10 @@ const actions = { postUnlike(context, { post, parentAnnounce }) { return axios.delete(OC.generateUrl(`apps/social/api/v1/post/like?postId=${post.id}`)).then((response) => { context.commit('unlikePost', { post, parentAnnounce }) - // eslint-disable-next-line no-console - console.log('Post unliked with token ' + response.data.result.token) + // Remove post from list if we are in the 'liked' timeline + if (state.type === 'liked') { + context.commit('removePost', post) + } }).catch((error) => { OC.Notification.showTemporary('Failed to unlike post') console.error('Failed to unlike post', error) |