From d766059deef65ea8c46616b340f6038476b47edf Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 25 Mar 2019 21:19:24 +0200 Subject: [PATCH] correctly update relationship on follow/unfollow --- src/services/follow_manipulate/follow_manipulate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/follow_manipulate/follow_manipulate.js b/src/services/follow_manipulate/follow_manipulate.js index 1e9bd679..51dafe84 100644 --- a/src/services/follow_manipulate/follow_manipulate.js +++ b/src/services/follow_manipulate/follow_manipulate.js @@ -19,7 +19,7 @@ const fetchUser = (attempt, user, store) => new Promise((resolve, reject) => { export const requestFollow = (user, store) => new Promise((resolve, reject) => { store.state.api.backendInteractor.followUser(user.id) .then((updated) => { - store.commit('addNewUsers', [updated]) + store.commit('updateUserRelationship', [updated]) // For locked users we just mark it that we sent the follow request if (updated.locked) { @@ -66,7 +66,7 @@ export const requestFollow = (user, store) => new Promise((resolve, reject) => { export const requestUnfollow = (user, store) => new Promise((resolve, reject) => { store.state.api.backendInteractor.unfollowUser(user.id) .then((updated) => { - store.commit('addNewUsers', [updated]) + store.commit('updateUserRelationship', [updated]) resolve({ updated })