Fix minor UI rendering regressions

This commit is contained in:
Luminarys 2018-02-27 01:40:08 -08:00
parent 9c8c892ad9
commit 964ecad002
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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() {