From 8959cdaeb14e4c7ccd2578dee51648aced83aa3c Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 26 Aug 2018 10:31:13 -0700 Subject: [PATCH] fix incorrect toast notification for follow requests (#493) --- routes/_actions/follow.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/routes/_actions/follow.js b/routes/_actions/follow.js index 8b7db44..e2f2c8b 100644 --- a/routes/_actions/follow.js +++ b/routes/_actions/follow.js @@ -2,28 +2,19 @@ import { store } from '../_store/store' import { followAccount, unfollowAccount } from '../_api/follow' import { toast } from '../_utils/toast' import { updateProfileAndRelationship } from './accounts' -import { - getRelationship as getRelationshipFromDatabase -} from '../_database/relationships' export async function setAccountFollowed (accountId, follow, toastOnSuccess) { let { currentInstance, accessToken } = store.get() try { - let account if (follow) { - account = await followAccount(currentInstance, accessToken, accountId) + await followAccount(currentInstance, accessToken, accountId) } else { - account = await unfollowAccount(currentInstance, accessToken, accountId) + await unfollowAccount(currentInstance, accessToken, accountId) } await updateProfileAndRelationship(accountId) - let relationship = await getRelationshipFromDatabase(currentInstance, accountId) if (toastOnSuccess) { if (follow) { - if (account.locked && relationship.requested) { - toast.say('Requested to follow account') - } else { - toast.say('Followed account') - } + toast.say('Followed account') } else { toast.say('Unfollowed account') }