Mercurial > hg > ugly-duckling
changeset 362:bcb0a172eca3
Populate item with features when extracted. This should be moved to happen in a subscription.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Tue, 30 May 2017 15:08:15 +0100 |
parents | f12a12ce9de0 |
children | 53d33e0d0636 |
files | src/app/app.component.ts |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/app.component.ts Tue May 30 15:07:32 2017 +0100 +++ b/src/app/app.component.ts Tue May 30 15:08:15 2017 +0100 @@ -201,8 +201,15 @@ }, key: outputInfo.extractorKey, outputId: outputInfo.outputId - }).then(() => { + }).then(result => { // TODO subscribe to the extraction service instead + const i = this.analyses.findIndex(val => val.id === result.id); this.canExtract = true; + if (i !== -1) { + this.analyses.set( + i, + Object.assign({}, this.analyses.get(i), result.result) + ); + } // TODO else remove the item? }).catch(err => { this.canExtract = true; this.analyses.shift();