"Profile unavailable" only if blocked, fixes #96

merge-requests/70/head
Alex Gleason 4 years ago
parent 463a2b7b2d
commit e101afd619
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

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

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

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

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

Loading…
Cancel
Save