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,
|
||||
};
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user