diff options
Diffstat (limited to 'webapp/components/sidebar_right/sidebar_right.jsx')
-rw-r--r-- | webapp/components/sidebar_right/sidebar_right.jsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/webapp/components/sidebar_right/sidebar_right.jsx b/webapp/components/sidebar_right/sidebar_right.jsx index 00a7d2d25..f48bcaa56 100644 --- a/webapp/components/sidebar_right/sidebar_right.jsx +++ b/webapp/components/sidebar_right/sidebar_right.jsx @@ -15,6 +15,7 @@ import WebrtcStore from 'stores/webrtc_store.jsx'; import {getFlaggedPosts, getPinnedPosts} from 'actions/post_actions.jsx'; import {trackEvent} from 'actions/diagnostics_actions.jsx'; +import {postListScrollChange} from 'actions/global_actions.jsx'; import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; @@ -120,10 +121,16 @@ export default class SidebarRight extends React.Component { return null; } - componentDidUpdate() { + componentDidUpdate(prevProps, prevState) { const isOpen = this.state.searchVisible || this.props.postRightVisible; WebrtcStore.emitRhsChanged(isOpen); this.doStrangeThings(); + + const wasOpen = prevState.searchVisible || prevProps.postRightVisible; + + if (isOpen && !wasOpen) { + postListScrollChange(); + } } onPreferenceChange() { |