From f4856ba3666d8a3b9c0dfa9668bc6414f0744f81 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 29 Dec 2017 14:34:53 -0500 Subject: [PATCH] Fix redirect to new torrent This also fixes some unknown issues with torrent customization. --- src/ui/add_torrent.js | 21 ++++++--------------- src/ui/torrent_options.js | 2 ++ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/ui/add_torrent.js b/src/ui/add_torrent.js index 3bb055d..6ab60a2 100644 --- a/src/ui/add_torrent.js +++ b/src/ui/add_torrent.js @@ -75,10 +75,10 @@ class AddTorrent extends Component { downloadThrottle } = this.state; const { dispatch } = this.props; - const customize = // TODO: File options + const customize = priority !== 3 || - uploadThrottle !== -1 || - downloadThrottle !== -1; + uploadThrottle !== null || + downloadThrottle !== null; if (!customize) { dispatch(push(`/torrents/${id}`)); return; @@ -102,10 +102,10 @@ class AddTorrent extends Component { this.setState({ loading: true }); const { magnet, file, start } = this.state; const { dispatch } = this.props; - const customize = // TODO: File options + const customize = this.state.priority !== 3 || - this.state.uploadThrottle !== -1 || - this.state.downloadThrottle !== -1; + this.state.uploadThrottle !== null || + this.state.downloadThrottle !== null; const handleOffer = async offer => { switch (offer.type) { case "TRANSFER_OFFER": @@ -232,15 +232,6 @@ class AddTorrent extends Component { {this.renderOptions.bind(this)()} - {torrent && - - - - TODO - - - - }