Fixed issue with loading context, comments from Status feature

• Fixed:
- issue with loading context, comments from Status feature by loading in feature not child

• Added:
- check for if ancestor status exists in StatusContainer
This commit is contained in:
mgabdev
2020-07-21 22:27:48 -05:00
parent 5fcc09acad
commit d6b8948191
3 changed files with 26 additions and 3 deletions

View File

@@ -173,7 +173,7 @@ class Status extends ImmutablePureComponent {
// Compensate height changes
componentDidUpdate(prevProps, prevState, snapshot) {
// timeline lazy loading comments
if (!prevState.loadedComments && this.state.loadedComments && this.props.status && !this.props.isChild) {
if (!prevState.loadedComments && this.state.loadedComments && this.props.status && !this.props.isChild && this.props.contextType !== 'feature') {
const commentCount = this.props.status.get('replies_count')
if (this.props.isComment && !this.props.ancestorStatus) {
this.props.onFetchContext(this.props.status.get('id'))