Connecting...
+ ); + } +} diff --git a/src/ui/torrent_details.js b/src/ui/torrent_details.js index 38d58b2..32bc93c 100644 --- a/src/ui/torrent_details.js +++ b/src/ui/torrent_details.js @@ -13,9 +13,8 @@ import { Progress } from 'reactstrap'; import ws_send from '../socket'; +import selectTorrent, { UNION } from '../actions/selection'; -// TODO: use component lifecycle functions here to invoke -// torrent_state.updateSubscriptions // TODO: fix navigating directly to torrent pages function File({ file }) { @@ -152,6 +151,13 @@ class TorrentDetails extends Component { }; } + componentDidMount() { + const { dispatch } = this.props; + const { ids } = this.props.match.params; + const _ids = ids.split(","); + _ids.forEach(id => dispatch(selectTorrent(id, UNION))); + } + renderHeader(selection) { return (