about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-12-18 18:05:29 +0100
committerThibG <thib@sitedethib.com>2018-12-21 19:54:54 +0100
commit3611ea02e229e8554d728cd9a70fd15f64dcbb8d (patch)
treeeaecfed6d21c355ad34b4becb3a82874be7122c1 /app/javascript/flavours/glitch/features
parent4be73132982fec0a38420811ae28a4ffd2ea09c7 (diff)
[Glitch] Deep compare tags for hashtag column reload
Port 4fdefffb9906ffc3e5fde7af652674bebffd6e15 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r--app/javascript/flavours/glitch/features/hashtag_timeline/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
index 4455f8957..49893dde8 100644
--- a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
@@ -9,6 +9,7 @@ import { expandHashtagTimeline, clearTimeline } from 'flavours/glitch/actions/ti
 import { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';
 import { FormattedMessage } from 'react-intl';
 import { connectHashtagStream } from 'flavours/glitch/actions/streaming';
+import { isEqual } from 'lodash';
 
 const mapStateToProps = (state, props) => ({
   hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
@@ -99,7 +100,7 @@ export default class HashtagTimeline extends React.PureComponent {
   componentWillReceiveProps (nextProps) {
     const { dispatch, params } = this.props;
     const { id, tags } = nextProps.params;
-    if (id !== params.id || tags !== params.tags) {
+    if (id !== params.id || !isEqual(tags, params.tags)) {
       this._unsubscribe();
       this._subscribe(dispatch, id, tags);
       this.props.dispatch(clearTimeline(`hashtag:${id}`));