Skip to content
Snippets Groups Projects
Commit 45feb439 authored by Akihiko Odaki's avatar Akihiko Odaki Committed by Eugen Rochko
Browse files

Finalize location on scrollable notifications when unmounting (#6614)

The top of the scrollable notifications will be invisible after unmounting.
The Redux state should be updated accordingly in such a case so that the
unread notification counter will be updated later.
parent 44829d82
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,13 @@ export default class Notifications extends React.PureComponent {
trackScroll: true,
};
componentWillUnmount () {
this.handleScrollToBottom.cancel();
this.handleScrollToTop.cancel();
this.handleScroll.cancel();
this.props.dispatch(scrollTopNotifications(false));
}
handleScrollToBottom = debounce(() => {
this.props.dispatch(scrollTopNotifications(false));
this.props.dispatch(expandNotifications());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment