This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
fix: OPTIC-218: 'Annotation saved successfully' message is NOT displayed when user exit label stream using 'Submit and exit' option #293
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4432712
fix: OPTIC-218: 'Annotation saved successfully' message is NOT displa…
yyassi-heartex 416535b
Update src/sdk/lsf-sdk.js
yyassi-heartex d9f2b08
Merge branch 'master' into fb-optic-218/confirm-message
yyassi-heartex 27d758a
clean up based on feedback
yyassi-heartex 7070901
Merge branch 'master' into fb-optic-218/confirm-message
yyassi-heartex 713dc29
Merge branch 'master' into fb-optic-218/confirm-message
yyassi-heartex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -586,11 +586,14 @@ export class LSFWrapper { | |||||||||
// don't react on duplicated annotations error | ||||||||||
{ errorHandler: result => result.status === 409 }, | ||||||||||
); | ||||||||||
}, false, loadNext, exitStream); | ||||||||||
}, false, loadNext); | ||||||||||
const status = result?.$meta?.status; | ||||||||||
|
||||||||||
if (status === 200 || status === 201) this.datamanager.invoke("toast", { message: "Annotation saved successfully", type: "info" }); | ||||||||||
else if (status !== undefined) this.datamanager.invoke("toast", { message: "There was an error saving your Annotation", type: "error" }); | ||||||||||
|
||||||||||
if (exitStream) return this.exitStream(); | ||||||||||
|
||||||||||
Comment on lines
+594
to
+596
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
}; | ||||||||||
|
||||||||||
/** @private */ | ||||||||||
|
@@ -854,7 +857,7 @@ export class LSFWrapper { | |||||||||
if (isFF(FF_OPTIC_2)) this.saveDraft(); | ||||||||||
this.loadTask(prevTaskId, prevAnnotationId, true); | ||||||||||
} | ||||||||||
async submitCurrentAnnotation(eventName, submit, includeId = false, loadNext = true, exitStream) { | ||||||||||
async submitCurrentAnnotation(eventName, submit, includeId = false, loadNext = true) { | ||||||||||
const { taskID, currentAnnotation } = this; | ||||||||||
const unique_id = this.task.unique_lock_id; | ||||||||||
const serializedAnnotation = this.prepareData(currentAnnotation, { includeId }); | ||||||||||
|
@@ -889,7 +892,6 @@ export class LSFWrapper { | |||||||||
} | ||||||||||
|
||||||||||
this.setLoading(false); | ||||||||||
if (exitStream) return this.exitStream(); | ||||||||||
|
||||||||||
if (!loadNext || this.datamanager.isExplorer) { | ||||||||||
await this.loadTask(taskID, currentAnnotation.pk, true); | ||||||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only place passed this parameter in is this place, so please remove
exiStream
fromsubmitCurrentAnnotation()
as well.