Updated timeline/notification dequeue to be in componentDidMount
This commit is contained in:
parent
4043355b01
commit
45dcd5a1ab
@ -27,7 +27,7 @@ export default class StatusList extends ImmutablePureComponent {
|
|||||||
onDequeueTimeline: PropTypes.func,
|
onDequeueTimeline: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentDidMount() {
|
||||||
this.handleDequeueTimeline();
|
this.handleDequeueTimeline();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -73,6 +73,7 @@ export default class StatusList extends ImmutablePureComponent {
|
|||||||
|
|
||||||
handleDequeueTimeline = () => {
|
handleDequeueTimeline = () => {
|
||||||
const { onDequeueTimeline, timelineId } = this.props;
|
const { onDequeueTimeline, timelineId } = this.props;
|
||||||
|
if (!onDequeueTimeline || !timelineId) return;
|
||||||
onDequeueTimeline(timelineId);
|
onDequeueTimeline(timelineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,10 +69,10 @@ class Notifications extends React.PureComponent {
|
|||||||
this.handleScrollToTop.cancel();
|
this.handleScrollToTop.cancel();
|
||||||
this.handleScroll.cancel();
|
this.handleScroll.cancel();
|
||||||
this.props.dispatch(scrollTopNotifications(false));
|
this.props.dispatch(scrollTopNotifications(false));
|
||||||
this.handleDequeueNotifications();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
this.handleDequeueNotifications();
|
||||||
this.props.dispatch(scrollTopNotifications(true));
|
this.props.dispatch(scrollTopNotifications(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user