Completed import processing
This commit is contained in:
@@ -141,11 +141,17 @@ export default connect(mapStateToProps, mapDispatchToProps)(class extends IPCCon
|
||||
onImportSkylinksReply = (_, arg) => {
|
||||
this.props.notifyApplicationBusy(false);
|
||||
if (arg.data.Success) {
|
||||
console.log(arg.data.Result);
|
||||
const failedImportsArray = this.state.imports_array.filter(i => {
|
||||
return arg.data.Result.failed.includes(i.skylink);
|
||||
});
|
||||
this.setState({
|
||||
import_text: '',
|
||||
import_text: failedImportsArray.length > 0 ? JSON.stringify(failedImportsArray, null, 2) : '',
|
||||
imports_array: [],
|
||||
second_stage: false,
|
||||
}, () => {
|
||||
if (failedImportsArray.length > 0) {
|
||||
this.props.notifyError(`Failed to import ${failedImportsArray.length} item(s)`)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.props.notifyError(arg.data.Error);
|
||||
|
||||
Reference in New Issue
Block a user