We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7c948f commit 161dbd3Copy full SHA for 161dbd3
1 file changed
app/javascript/mastodon/features/list_timeline/index.js
@@ -75,6 +75,23 @@ class ListTimeline extends React.PureComponent {
75
this.disconnect = dispatch(connectListStream(id));
76
}
77
78
+ componentWillReceiveProps (nextProps) {
79
+ const { dispatch } = this.props;
80
+ const { id } = nextProps.params;
81
+
82
+ if (id !== this.props.params.id) {
83
+ if (this.disconnect) {
84
+ this.disconnect();
85
+ this.disconnect = null;
86
+ }
87
88
+ dispatch(fetchList(id));
89
+ dispatch(expandListTimeline(id));
90
91
+ this.disconnect = dispatch(connectListStream(id));
92
93
94
95
componentWillUnmount () {
96
if (this.disconnect) {
97
this.disconnect();
0 commit comments