From 49341ce3cffe2414cde26bec8cc659db5a40fa47 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 12 Sep 2017 14:33:40 -0400 Subject: [PATCH] Remove pieces --- src/actions/selection.js | 6 +----- src/reducers/index.js | 2 -- src/reducers/pieces.js | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 src/reducers/pieces.js diff --git a/src/actions/selection.js b/src/actions/selection.js index 436e9ab..810edf5 100644 --- a/src/actions/selection.js +++ b/src/actions/selection.js @@ -15,7 +15,7 @@ export default function selectTorrent(ids, action, navigate=true) { const next = new Set(state.selection); const filter_subscriptions = state.filter_subscribe; const subscriptions = state.subscribe; - const { peers, files, pieces, trackers } = state; + const { peers, files, trackers } = state; const added = next.difference(previous); const removed = previous.difference(next); @@ -26,7 +26,6 @@ export default function selectTorrent(ids, action, navigate=true) { ]; dispatch(filter_subscribe("peer", criteria)); dispatch(filter_subscribe("file", criteria)); - dispatch(filter_subscribe("piece", criteria)); dispatch(filter_subscribe("tracker", criteria)); }); @@ -47,9 +46,6 @@ export default function selectTorrent(ids, action, navigate=true) { //...Object.values(trackers) // .filter(tracker => tracker.torrent_id === t) // .map(tracker => tracker.id), - //...Object.values(pieces) - // .filter(piece => piece.torrent_id === t) - // .map(piece => piece.id), ]; if (_ids.length > 0) { dispatch(unsubscribe(..._ids)); diff --git a/src/reducers/index.js b/src/reducers/index.js index 47ce565..cd3b417 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -9,7 +9,6 @@ import torrents from './torrents'; import files from './files'; import peers from './peers'; import trackers from './trackers'; -import pieces from './pieces'; const root = combineReducers({ socket, @@ -21,7 +20,6 @@ const root = combineReducers({ files, peers, trackers, - pieces, router: routerReducer }); diff --git a/src/reducers/pieces.js b/src/reducers/pieces.js deleted file mode 100644 index a235164..0000000 --- a/src/reducers/pieces.js +++ /dev/null @@ -1,3 +0,0 @@ -import reducer from './resource'; -const pieces = reducer("piece"); -export default pieces;