if (error.response) {
const { data, status, statusText } = error.response;
+ if (status === 404 || status === 410) {
+ // Skip these errors as they are reflected in the UI
+ return {};
+ }
+
let message = statusText;
let title = `${status}`;
import HeaderContainer from '../account_timeline/containers/header_container';
import { ScrollContainer } from 'react-router-scroll-4';
import LoadMore from '../../components/load_more';
+import MissingIndicator from 'mastodon/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
medias: getAccountGallery(state, props.params.accountId),
isLoading: state.getIn(['timelines', `account:${props.params.accountId}:media`, 'isLoading']),
hasMore: state.getIn(['timelines', `account:${props.params.accountId}:media`, 'hasMore']),
medias: ImmutablePropTypes.list.isRequired,
isLoading: PropTypes.bool,
hasMore: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentDidMount () {
}
render () {
- const { medias, shouldUpdateScroll, isLoading, hasMore } = this.props;
+ const { medias, shouldUpdateScroll, isLoading, hasMore, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
let loadOlder = null;
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import InnerHeader from '../../account/components/header';
-import MissingIndicator from '../../../components/missing_indicator';
import ImmutablePureComponent from 'react-immutable-pure-component';
import MovedNote from './moved_note';
import { FormattedMessage } from 'react-intl';
const { account, hideTabs, identity_proofs } = this.props;
if (account === null) {
- return <MissingIndicator />;
+ return null;
}
return (
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import { fetchAccountIdentityProofs } from '../../actions/identity_proofs';
+import MissingIndicator from 'mastodon/components/missing_indicator';
const emptyList = ImmutableList();
const path = withReplies ? `${accountId}:with_replies` : accountId;
return {
+ isAccount: !!state.getIn(['accounts', accountId]),
statusIds: state.getIn(['timelines', `account:${path}`, 'items'], emptyList),
featuredStatusIds: withReplies ? ImmutableList() : state.getIn(['timelines', `account:${accountId}:pinned`, 'items'], emptyList),
isLoading: state.getIn(['timelines', `account:${path}`, 'isLoading']),
hasMore: PropTypes.bool,
withReplies: PropTypes.bool,
blockedBy: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}
render () {
- const { shouldUpdateScroll, statusIds, featuredStatusIds, isLoading, hasMore, blockedBy } = this.props;
+ const { shouldUpdateScroll, statusIds, featuredStatusIds, isLoading, hasMore, blockedBy, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
if (!statusIds && isLoading) {
return (
import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
import ScrollableList from '../../components/scrollable_list';
+import MissingIndicator from 'mastodon/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
accountIds: state.getIn(['user_lists', 'followers', props.params.accountId, 'items']),
hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),
blockedBy: state.getIn(['relationships', props.params.accountId, 'blocked_by'], false),
accountIds: ImmutablePropTypes.list,
hasMore: PropTypes.bool,
blockedBy: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}, 300, { leading: true });
render () {
- const { shouldUpdateScroll, accountIds, hasMore, blockedBy } = this.props;
+ const { shouldUpdateScroll, accountIds, hasMore, blockedBy, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
if (!accountIds) {
return (
import HeaderContainer from '../account_timeline/containers/header_container';
import ColumnBackButton from '../../components/column_back_button';
import ScrollableList from '../../components/scrollable_list';
+import MissingIndicator from 'mastodon/components/missing_indicator';
const mapStateToProps = (state, props) => ({
+ isAccount: !!state.getIn(['accounts', props.params.accountId]),
accountIds: state.getIn(['user_lists', 'following', props.params.accountId, 'items']),
hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']),
blockedBy: state.getIn(['relationships', props.params.accountId, 'blocked_by'], false),
accountIds: ImmutablePropTypes.list,
hasMore: PropTypes.bool,
blockedBy: PropTypes.bool,
+ isAccount: PropTypes.bool,
};
componentWillMount () {
}, 300, { leading: true });
render () {
- const { shouldUpdateScroll, accountIds, hasMore, blockedBy } = this.props;
+ const { shouldUpdateScroll, accountIds, hasMore, blockedBy, isAccount } = this.props;
+
+ if (!isAccount) {
+ return (
+ <Column>
+ <MissingIndicator />
+ </Column>
+ );
+ }
if (!accountIds) {
return (