diff --git a/app/javascript/mastodon/containers/status_container.js b/app/javascript/mastodon/containers/status_container.js index 3444e06c47..941cc03230 100644 --- a/app/javascript/mastodon/containers/status_container.js +++ b/app/javascript/mastodon/containers/status_container.js @@ -44,7 +44,7 @@ const makeMapStateToProps = () => { const mapStateToProps = (state, props) => { const status = getStatus(state, props); - const sons = state.getIn(['contexts', 'replies', status.getIn(['reblog', 'id'], props.id)]); + const sons = (props.showThread && status!==null) ? state.getIn(['contexts', 'replies', status.getIn(['reblog', 'id'], props.id)]) : null; return ({ 'status': status, 'sonsIds': (props.showThread && sons) ? sons.map(id => ({ diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index cc16f405ee..6eda8d7eb6 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -151,7 +151,7 @@ const makeMapStateToProps = () => { ancestorsIds = getAncestorsIds(state, { id: status.get('in_reply_to_id') }); const root_status = ancestorsIds.size? getStatus(state, {id: ancestorsIds.get(0)}) : status; //error is directly visit url of non-root detailedStatus, feature! rootAcct = root_status? root_status.getIn(['account', 'acct']) : -1; - descendantsIds = rootAcct == '0' ? state.getIn(['contexts', 'replies', status.get('id')]) : getDescendantsIds(state, { id: status.get('id') }); + descendantsIds = rootAcct == '0' ? state.getIn(['contexts', 'replies', status.get('id')]).reverse() : getDescendantsIds(state, { id: status.get('id') }); deep = rootAcct == '0' ? ancestorsIds.size : null; treeData = rootAcct == '0' ? getTreeData(state, {id: status.get('id')}) : null; }