Skip to content

Commit

Permalink
Revert DRAW_AREA rename
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Dec 14, 2023
1 parent c6ead1b commit b535529
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ constructor(
DATE,
TIME,
DROP_PIN,
DRAW_POLYGON,
DRAW_AREA,
CAPTURE_LOCATION
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ internal object ValueJsonConverter {
DataStoreException.checkType(String::class.java, obj)
TimeResponse.fromDate(isoStringToDate(obj as String))
}
Task.Type.DRAW_POLYGON,
Task.Type.DRAW_AREA,
Task.Type.DROP_PIN -> {
GeometryTaskResponse.fromGeometry(
GeometryWrapperTypeConverter.fromString(obj as String)?.getGeometry()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enum class TaskEntityType(private val intValue: Int) : IntEnum {
Pair(DATE, Task.Type.DATE),
Pair(TIME, Task.Type.TIME),
Pair(POINT, Task.Type.DROP_PIN),
Pair(POLYGON, Task.Type.DRAW_POLYGON),
Pair(POLYGON, Task.Type.DRAW_AREA),
Pair(CAPTURE_LOCATION, Task.Type.CAPTURE_LOCATION)
)
private val REVERSE_TASK_TYPES: Map<Task.Type, TaskEntityType> =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ internal object SubmissionConverter {
Task.Type.DATE -> putDateResponse(taskId, obj, data)
Task.Type.TIME -> putTimeResponse(taskId, obj, data)
Task.Type.DROP_PIN -> putDropAPinResponse(taskId, obj, data)
Task.Type.DRAW_POLYGON -> putGeometryTaskResponse(taskId, obj, data)
Task.Type.DRAW_AREA -> putGeometryTaskResponse(taskId, obj, data)
Task.Type.CAPTURE_LOCATION -> putCaptureLocationResult(taskId, obj, data)
else -> throw DataStoreException("Unknown type " + task.type)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ internal object TaskConverter {
"multiple_choice" -> Task.Type.MULTIPLE_CHOICE
"photo" -> Task.Type.PHOTO
"drop_pin" -> Task.Type.DROP_PIN
"draw_area" -> Task.Type.DRAW_POLYGON
"draw_area" -> Task.Type.DRAW_AREA
"number" -> Task.Type.NUMBER
"date" -> Task.Type.DATE
"time" -> Task.Type.TIME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ internal constructor(
Task.Type.DATE -> DateTaskViewModel::class.java
Task.Type.TIME -> TimeTaskViewModel::class.java
Task.Type.DROP_PIN -> DropAPinTaskViewModel::class.java
Task.Type.DRAW_POLYGON -> PolygonDrawingViewModel::class.java
Task.Type.DRAW_AREA -> PolygonDrawingViewModel::class.java
Task.Type.CAPTURE_LOCATION -> CaptureLocationTaskViewModel::class.java
Task.Type.UNKNOWN -> throw IllegalArgumentException("Unsupported task type: $taskType")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ constructor(
Task.Type.MULTIPLE_CHOICE -> MultipleChoiceTaskFragment()
Task.Type.PHOTO -> PhotoTaskFragment()
Task.Type.DROP_PIN -> DropAPinTaskFragment()
Task.Type.DRAW_POLYGON -> PolygonDrawingTaskFragment()
Task.Type.DRAW_AREA -> PolygonDrawingTaskFragment()
Task.Type.NUMBER -> NumberTaskFragment()
Task.Type.DATE -> DateTaskFragment()
Task.Type.TIME -> TimeTaskFragment()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ValueJsonConverterTest(
pointGeometryTaskResponseString
),
arrayOf(
FakeData.newTask(type = Task.Type.DRAW_POLYGON),
FakeData.newTask(type = Task.Type.DRAW_AREA),
polygonGeometryTaskResponse,
polygonGeometryTaskResponseString
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class SubmissionLocalDataStoreConverterTest {
newTask("task3", Task.Type.MULTIPLE_CHOICE),
newTask("task4", Task.Type.PHOTO),
newTask("task5", Task.Type.DROP_PIN),
newTask("task6", Task.Type.DRAW_POLYGON),
newTask("task6", Task.Type.DRAW_AREA),
)
mockSubmissionDocumentSnapshot(SUBMISSION_ID, TEST_SUBMISSION_DOCUMENT)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class SubmissionMutationConverterTest {
),
ValueDelta(
taskId = "draw_area_task",
taskType = Task.Type.DRAW_POLYGON,
taskType = Task.Type.DRAW_AREA,
newValue = polygonGeometryTaskResponse
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class PolygonDrawingTaskFragmentTest :
Task(
id = "task_1",
index = 0,
type = Task.Type.DRAW_POLYGON,
type = Task.Type.DRAW_AREA,
label = "Task for drawing a polygon",
isRequired = false
)
Expand Down

0 comments on commit b535529

Please sign in to comment.