Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/ReviewTaskControls/ReviewTaskControls.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,15 @@ export class ReviewTaskControls extends Component {
);
const tags = uniqueTagsArray.join(",");

if (tags.length > 0 && this.state.tags === null) {
// Empty `state.tags` (null or "") means the user hasn't edited yet, so
// it's safe to mirror in whatever the loaded task tags are once they arrive.
if (tags.length > 0 && !this.state.tags) {
this.setState({ tags: tags });
}

if (prevProps.task.id !== this.props.task.id) {
// Clear tags if we are on a new task
this.setState({ tags: tags ?? null });
// Reset on task switch so the next task's tags can populate fresh.
this.setState({ tags: tags || null });
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/services/Task/TaskReview/TaskReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export const loadNextReviewTask = function (criteria = {}, lastTaskId, asMetaRev
);

return function (dispatch) {
const params = { sort, order, ...searchParameters, asMetaReview };
const params = { sort, order, ...searchParameters, asMetaReview, includeTags: true };
if (Number.isFinite(lastTaskId)) {
params.lastTaskId = lastTaskId;
}
Expand All @@ -497,7 +497,7 @@ export const fetchTaskForReview = function (taskId, includeMapillary = false) {
return new Endpoint(api.task.startReview, {
schema: taskSchema(),
variables: { id: taskId },
params: { mapillary: includeMapillary },
params: { mapillary: includeMapillary, includeTags: true },
})
.execute()
.then((normalizedResults) => {
Expand Down
Loading