Message when a profile is blocked changed
This commit is contained in:
parent
2104739f2c
commit
d448277bbe
1 changed files with 13 additions and 2 deletions
|
@ -39,11 +39,12 @@ const mapStateToProps = (state, { params: { username }, withReplies = false }) =
|
||||||
const path = withReplies ? `${accountId}:with_replies` : accountId;
|
const path = withReplies ? `${accountId}:with_replies` : accountId;
|
||||||
|
|
||||||
const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false);
|
const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false);
|
||||||
const unavailable = (me === accountId) ? false : isBlocked;
|
const unavailable = (me === accountId) ? false : true;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
accountId,
|
accountId,
|
||||||
unavailable,
|
unavailable,
|
||||||
|
isBlocked,
|
||||||
accountUsername,
|
accountUsername,
|
||||||
accountApId,
|
accountApId,
|
||||||
isAccount: !!state.getIn(['accounts', accountId]),
|
isAccount: !!state.getIn(['accounts', accountId]),
|
||||||
|
@ -117,7 +118,7 @@ class AccountTimeline extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { statusIds, featuredStatusIds, isLoading, hasMore, isAccount, accountId, unavailable, accountUsername } = this.props;
|
const { statusIds, featuredStatusIds, isLoading, hasMore, isAccount, accountId, isBlocked, unavailable, accountUsername } = this.props;
|
||||||
|
|
||||||
if (!isAccount && accountId !== -1) {
|
if (!isAccount && accountId !== -1) {
|
||||||
return (
|
return (
|
||||||
|
@ -135,6 +136,16 @@ class AccountTimeline extends ImmutablePureComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isBlocked) {
|
||||||
|
return (
|
||||||
|
<Column>
|
||||||
|
<div className='empty-column-indicator'>
|
||||||
|
<FormattedMessage id='empty_column.account_blocked' defaultMessage='You are blocked by @{accountUsername}.' values={{ accountUsername: accountUsername }} />
|
||||||
|
</div>
|
||||||
|
</Column>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (unavailable) {
|
if (unavailable) {
|
||||||
return (
|
return (
|
||||||
<Column>
|
<Column>
|
||||||
|
|
Loading…
Reference in a new issue