Skip to content
Extraits de code Groupes Projets
Valider 45feb439 rédigé par Akihiko Odaki's avatar Akihiko Odaki Validation de Eugen Rochko
Parcourir les fichiers

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
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter