Finished Engine re-write, awaiting testing

This commit is contained in:
2018-05-27 17:34:14 -04:00
parent 35a5ac37eb
commit d15bb9752a
5 changed files with 107 additions and 63 deletions

View File

@@ -151,10 +151,9 @@ const reducer = (state = initialState, action) => {
selectedRows.push(state.torrentList[element]) //pushing the selected rows out of torrentlist
});
let buttonStateTest = selectedRows.filter(element => { //TODO fix this bad mess... we literally just need to filter for stopped and go from there
let buttonStateTest = selectedRows.filter(element => {
let result = []
if (element.Status === "Downloading" || element.Status === "Awaiting Peers" || element.Status === "Seeding" || element.Status === "Completed"){
if (element.Status === "Downloading" || element.Status === "Awaiting Peers" || element.Status === "Seeding" || element.Status === "Completed" || element.Status === "Queued"){
result.push(element.Status)
return result
}
@@ -164,7 +163,6 @@ const reducer = (state = initialState, action) => {
if (buttonStateTest.length > 0 && buttonStateTest2.length === 0){
let buttonStateFinal = [{startButton: "default", stopButton: "primary", deleteButton: "secondary", fSeedButton: "default", fRecheckButton: "primary"}]
console.log("ButtonStateFil")
return {
...state,
buttonState: buttonStateFinal