"Profile unavailable" only if blocked, fixes #96

This commit is contained in:
Alex Gleason 2020-06-11 23:42:05 -05:00
parent 463a2b7b2d
commit e101afd619
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 4 additions and 12 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,