Merge pull request #36 from Luminarys/master

Fix minor UI rendering regressions
This commit is contained in:
Drew DeVault 2018-02-27 08:24:38 -05:00 committed by GitHub
commit b0916a59f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -130,6 +130,7 @@ class Torrent extends Component {
shouldComponentUpdate(nextProps, nextState) {
return nextProps.torrent !== this.props.torrent
|| nextState.removeDropdown !== this.state.removeDropdown
|| nextState.peersShown !== this.state.peersShown
|| nextState.trackersShown !== this.state.trackersShown
|| nextState.filesShown !== this.state.filesShown

View File

@ -18,11 +18,7 @@ class _Torrent extends Component {
const nt = nextProps.torrent;
const active = selection.indexOf(torrent.id);
const nActive = nextProps.selection.indexOf(torrent.id);
return active !== nActive
|| torrent.id !== nt.id
|| torrent.status !== nt.status
|| torrent.rate_down !== nt.rate_down
|| torrent.rate_up !== nt.rate_up;
return active !== nActive || torrent !== nt;
}
render() {