summaryrefslogtreecommitdiffstats
path: root/webapp/components/sidebar_right
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-07-10 17:35:50 -0400
committerSaturnino Abril <saturnino.abril@gmail.com>2017-07-11 05:35:50 +0800
commit0c910cc8c5a5487a129663431c6cd4d52640bd66 (patch)
tree6a7c2e043afebc8768ff606211199a18060b9ddb /webapp/components/sidebar_right
parent2190a288e004e46cddac992fc799dc1ae37fd4f3 (diff)
downloadchat-0c910cc8c5a5487a129663431c6cd4d52640bd66.tar.gz
chat-0c910cc8c5a5487a129663431c6cd4d52640bd66.tar.bz2
chat-0c910cc8c5a5487a129663431c6cd4d52640bd66.zip
Fix multiple pinned post issues (#6887)
Diffstat (limited to 'webapp/components/sidebar_right')
-rw-r--r--webapp/components/sidebar_right/sidebar_right.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/sidebar_right/sidebar_right.jsx b/webapp/components/sidebar_right/sidebar_right.jsx
index 21d3df345..737254682 100644
--- a/webapp/components/sidebar_right/sidebar_right.jsx
+++ b/webapp/components/sidebar_right/sidebar_right.jsx
@@ -77,12 +77,12 @@ export default class SidebarRight extends React.Component {
}
shouldComponentUpdate(nextProps, nextState) {
- return !Utils.areObjectsEqual(nextState, this.state) || !Utils.areObjectsEqual(nextProps, this.props);
+ return !Utils.areObjectsEqual(nextState, this.state) || this.props.postRightVisible !== nextProps.postRightVisible;
}
componentWillUpdate(nextProps, nextState) {
const isOpen = this.state.searchVisible || this.props.postRightVisible;
- const willOpen = nextState.searchVisible || nextState.postRightVisible;
+ const willOpen = nextState.searchVisible || nextProps.postRightVisible;
if (!isOpen && willOpen) {
trackEvent('ui', 'ui_rhs_opened');