From 882a288326fa2d43e8983866ae6edaf2c4d24c93 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 23 Mar 2018 08:39:09 -0700 Subject: [PATCH] only show hourglass for locked accounts --- routes/_actions/follow.js | 7 ++++--- routes/_components/AccountProfile.html | 20 +++++++++++--------- routes/_pages/accounts/[accountId].html | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/routes/_actions/follow.js b/routes/_actions/follow.js index 9f9c1c03..e50f8115 100644 --- a/routes/_actions/follow.js +++ b/routes/_actions/follow.js @@ -8,16 +8,17 @@ export async function setAccountFollowed (accountId, follow, toastOnSuccess) { let instanceName = store.get('currentInstance') let accessToken = store.get('accessToken') try { + let account if (follow) { - await followAccount(instanceName, accessToken, accountId) + account = await followAccount(instanceName, accessToken, accountId) } else { - await unfollowAccount(instanceName, accessToken, accountId) + account = await unfollowAccount(instanceName, accessToken, accountId) } await updateProfileAndRelationship(accountId) let relationship = await database.getRelationship(instanceName, accountId) if (toastOnSuccess) { if (follow) { - if (relationship.requested) { + if (account.locked && relationship.requested) { toast.say('Requested to follow account') } else { toast.say('Followed account') diff --git a/routes/_components/AccountProfile.html b/routes/_components/AccountProfile.html index 92815dc3..f29ee78a 100644 --- a/routes/_components/AccountProfile.html +++ b/routes/_components/AccountProfile.html @@ -1,18 +1,18 @@
+ style="background-image: url({{$autoplayGifs ? account.header : account.header_static}});">