From e101afd619d30c6c4a816c7c18d6b69f3068b82d Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 11 Jun 2020 23:42:05 -0500 Subject: [PATCH] "Profile unavailable" only if blocked, fixes #96 --- app/soapbox/features/account_gallery/index.js | 4 +--- app/soapbox/features/account_timeline/index.js | 4 +--- app/soapbox/features/followers/index.js | 4 +--- app/soapbox/features/following/index.js | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/app/soapbox/features/account_gallery/index.js b/app/soapbox/features/account_gallery/index.js index c1205c92c..c175c4c9f 100644 --- a/app/soapbox/features/account_gallery/index.js +++ b/app/soapbox/features/account_gallery/index.js @@ -34,9 +34,7 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) = } const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false); - const isLocked = state.getIn(['accounts', accountId, 'locked'], false); - const isFollowing = state.getIn(['relationships', accountId, 'following'], false); - const unavailable = (me === accountId) ? false : (isBlocked || (isLocked && !isFollowing)); + const unavailable = (me === accountId) ? false : isBlocked; return { accountId, diff --git a/app/soapbox/features/account_timeline/index.js b/app/soapbox/features/account_timeline/index.js index 9f7be480c..4bd7090c0 100644 --- a/app/soapbox/features/account_timeline/index.js +++ b/app/soapbox/features/account_timeline/index.js @@ -34,9 +34,7 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) = const path = withReplies ? `${accountId}:with_replies` : accountId; const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false); - const isLocked = state.getIn(['accounts', accountId, 'locked'], false); - const isFollowing = state.getIn(['relationships', accountId, 'following'], false); - const unavailable = (me === accountId) ? false : (isBlocked || (isLocked && !isFollowing)); + const unavailable = (me === accountId) ? false : isBlocked; return { accountId, diff --git a/app/soapbox/features/followers/index.js b/app/soapbox/features/followers/index.js index a9c36b686..86709545e 100644 --- a/app/soapbox/features/followers/index.js +++ b/app/soapbox/features/followers/index.js @@ -33,9 +33,7 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) = const diffCount = getFollowDifference(state, accountId, 'followers'); const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false); - const isLocked = state.getIn(['accounts', accountId, 'locked'], false); - const isFollowing = state.getIn(['relationships', accountId, 'following'], false); - const unavailable = (me === accountId) ? false : (isBlocked || (isLocked && !isFollowing)); + const unavailable = (me === accountId) ? false : isBlocked; return { accountId, diff --git a/app/soapbox/features/following/index.js b/app/soapbox/features/following/index.js index 6b00aca63..db42b53b3 100644 --- a/app/soapbox/features/following/index.js +++ b/app/soapbox/features/following/index.js @@ -33,9 +33,7 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) = const diffCount = getFollowDifference(state, accountId, 'following'); const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false); - const isLocked = state.getIn(['accounts', accountId, 'locked'], false); - const isFollowing = state.getIn(['relationships', accountId, 'following'], false); - const unavailable = (me === accountId) ? false : (isBlocked || (isLocked && !isFollowing)); + const unavailable = (me === accountId) ? false : isBlocked; return { accountId,