Updated timeline/notification dequeue to be in componentDidMount

This commit is contained in:
mgabdev 2019-07-11 17:31:04 -04:00
parent 4043355b01
commit 45dcd5a1ab
2 changed files with 3 additions and 2 deletions

@ -27,7 +27,7 @@ export default class StatusList extends ImmutablePureComponent {
onDequeueTimeline: PropTypes.func,
};
componentWillUnmount() {
componentDidMount() {
this.handleDequeueTimeline();
};
@ -73,6 +73,7 @@ export default class StatusList extends ImmutablePureComponent {
handleDequeueTimeline = () => {
const { onDequeueTimeline, timelineId } = this.props;
if (!onDequeueTimeline || !timelineId) return;
onDequeueTimeline(timelineId);
}

@ -69,10 +69,10 @@ class Notifications extends React.PureComponent {
this.handleScrollToTop.cancel();
this.handleScroll.cancel();
this.props.dispatch(scrollTopNotifications(false));
this.handleDequeueNotifications();
}
componentDidMount() {
this.handleDequeueNotifications();
this.props.dispatch(scrollTopNotifications(true));
}