|
|
|
@ -156,10 +156,10 @@ function serverFailedReducer(oldState: AppState, action: ServerFailedAction): Ap |
|
|
|
|
return oldState |
|
|
|
|
} |
|
|
|
|
const failedIndexes: {[id: number]: boolean|undefined} = {} |
|
|
|
|
for (let index = 0; index < action.failures.length; index += 1) { |
|
|
|
|
failedIndexes[action.failures[index].id] = true |
|
|
|
|
for (let index = 0; index < action.ids.length; index += 1) { |
|
|
|
|
failedIndexes[action.ids[index]] = true |
|
|
|
|
} |
|
|
|
|
// TODO: Figure out somewhere to put the failures for logging purposes, so the messages aren't wasted.
|
|
|
|
|
// TODO: Figure out somewhere to put the failure message for logging purposes, so the messages aren't wasted.
|
|
|
|
|
/* const failedActions = */ |
|
|
|
|
oldState.network.sentActions.filter((sent) => !!failedIndexes[sent.id]).map((sent) => sent.action) |
|
|
|
|
const stillWaitingActions = oldState.network.sentActions.filter((sent) => !failedIndexes[sent.id]) |
|
|
|
|