Skip to content

Commit

Permalink
Remove unused method from LocationOfInterestHelper (#2538)
Browse files Browse the repository at this point in the history
* Remove unused method getSubtitle() from LocationOfInterestHelper

* Remove unused strings
  • Loading branch information
shobhitagarwal1612 authored Jul 12, 2024
1 parent f0c24d0 commit e7c8cad
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,4 @@ class LocationOfInterestHelper @Inject internal constructor(private val resource
is MultiPolygon -> resources.getString(R.string.unnamed_area)
else -> throw IllegalArgumentException("Unsupported geometry type $this")
}

fun getSubtitle(loi: LocationOfInterest): String =
resources.getString(R.string.layer_label_format, loi.job.name)
}
1 change: 0 additions & 1 deletion ground/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<string name="time">Hora</string>
<!-- Other strings (to be organized) -->
<string name="sync_status">Historial y estado de sincronización</string>
<string name="layer_label_format">Capa: %s</string>

<string name="add_point">Agregar punto</string>
<string name="complete_polygon">Completo</string>
Expand Down
1 change: 0 additions & 1 deletion ground/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<string name="time">Time</string>
<!-- Other strings (to be organized) -->
<string name="sync_status">History and sync status</string>
<string name="layer_label_format">Job: %s</string>

<string name="add_point">Add point</string>
<string name="complete_polygon">Complete</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ class LocationOfInterestHelperTest : BaseHiltTest() {

@Inject lateinit var loiHelper: LocationOfInterestHelper

@Test
fun testGetSubtitle() {
val loi = FakeData.LOCATION_OF_INTEREST.copy(job = FakeData.JOB.copy(name = TEST_JOB_NAME))
assertThat(loiHelper.getSubtitle(loi)).isEqualTo("Job: $TEST_JOB_NAME")
}

@Test
fun testLoiNameWithPoint_whenCustomIdAndPropertiesAreNull() {
assertThat(loiHelper.getDisplayLoiName(TEST_LOI.copy(customId = "", properties = mapOf())))
Expand Down Expand Up @@ -119,6 +113,5 @@ class LocationOfInterestHelperTest : BaseHiltTest() {
companion object {
private val TEST_LOI = FakeData.LOCATION_OF_INTEREST.copy()
private val TEST_AREA = FakeData.AREA_OF_INTEREST.copy()
private const val TEST_JOB_NAME = "some job name"
}
}

0 comments on commit e7c8cad

Please sign in to comment.