Browse Source

fix bugs;闭社树按时间倒序

pull/4/head
欧醚 4 years ago
parent
commit
aeb8046cb5
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/javascript/mastodon/containers/status_container.js
  2. +1
    -1
      app/javascript/mastodon/features/status/index.js

+ 1
- 1
app/javascript/mastodon/containers/status_container.js View File

@ -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 => ({

+ 1
- 1
app/javascript/mastodon/features/status/index.js View File

@ -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;
}

Loading…
Cancel
Save