ソースを参照

Fix not being able to directly switch between list timelines in web UI (#10973)

master^2
Eugen Rochko 5年前
committed by GitHub
コミット
5bfd802c57
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更17行の追加0行の削除
  1. +17
    -0
      app/javascript/mastodon/features/list_timeline/index.js

+ 17
- 0
app/javascript/mastodon/features/list_timeline/index.js ファイルの表示

@@ -75,6 +75,23 @@ class ListTimeline extends React.PureComponent {
this.disconnect = dispatch(connectListStream(id));
}

componentWillReceiveProps (nextProps) {
const { dispatch } = this.props;
const { id } = nextProps.params;

if (id !== this.props.params.id) {
if (this.disconnect) {
this.disconnect();
this.disconnect = null;
}

dispatch(fetchList(id));
dispatch(expandListTimeline(id));

this.disconnect = dispatch(connectListStream(id));
}
}

componentWillUnmount () {
if (this.disconnect) {
this.disconnect();


読み込み中…
キャンセル
保存