Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace check for valid addLoiTask using task type instead of TaskValue's type. #2981

Open
github-actions bot opened this issue Jan 5, 2025 · 0 comments
Assignees

Comments

@github-actions
Copy link

github-actions bot commented Jan 5, 2025

// TODO: Replace check for valid addLoiTask using task type instead of TaskValue's type.
// Issue URL: https://github.com/google/ground-android/issues/2981


    val addLoiTaskId = deltas.indexOfFirst { it.taskId == addLoiTask.id }
    if (addLoiTaskId < 0) error("Add LOI task response missing")
    val addLoiValue = deltas.removeAt(addLoiTaskId).newTaskData
    // TODO: Replace check for valid addLoiTask using task type instead of TaskValue's type.
    // Issue URL: https://github.com/google/ground-android/issues/2981
    if (addLoiValue !is GeometryTaskData) error("Invalid add LOI task response")
    return locationOfInterestRepository.saveLoi(
      addLoiValue.geometry,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant