Fix minor UI rendering regressions
This commit is contained in:
parent
9c8c892ad9
commit
964ecad002
|
@ -130,6 +130,7 @@ class Torrent extends Component {
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps, nextState) {
|
shouldComponentUpdate(nextProps, nextState) {
|
||||||
return nextProps.torrent !== this.props.torrent
|
return nextProps.torrent !== this.props.torrent
|
||||||
|
|| nextState.removeDropdown !== this.state.removeDropdown
|
||||||
|| nextState.peersShown !== this.state.peersShown
|
|| nextState.peersShown !== this.state.peersShown
|
||||||
|| nextState.trackersShown !== this.state.trackersShown
|
|| nextState.trackersShown !== this.state.trackersShown
|
||||||
|| nextState.filesShown !== this.state.filesShown
|
|| nextState.filesShown !== this.state.filesShown
|
||||||
|
|
|
@ -18,11 +18,7 @@ class _Torrent extends Component {
|
||||||
const nt = nextProps.torrent;
|
const nt = nextProps.torrent;
|
||||||
const active = selection.indexOf(torrent.id);
|
const active = selection.indexOf(torrent.id);
|
||||||
const nActive = nextProps.selection.indexOf(torrent.id);
|
const nActive = nextProps.selection.indexOf(torrent.id);
|
||||||
return active !== nActive
|
return active !== nActive || torrent !== nt;
|
||||||
|| torrent.id !== nt.id
|
|
||||||
|| torrent.status !== nt.status
|
|
||||||
|| torrent.rate_down !== nt.rate_down
|
|
||||||
|| torrent.rate_up !== nt.rate_up;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user