Skip to content

Commit

Permalink
shop overlay: remove workaround for missing vacant shop preset (fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed May 1, 2023
1 parent 07eae86 commit 7eabae9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.westnordost.streetcomplete.overlays.shops

import android.content.SharedPreferences
import android.content.res.Resources
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AlertDialog
Expand Down Expand Up @@ -69,7 +68,7 @@ class ShopsOverlayForm : AbstractOverlayForm() {
val element = element
originalFeature = element?.let {
if (IS_DISUSED_SHOP_EXPRESSION.matches(element)) {
createVacantShop(requireContext().resources)
featureDictionary.byId("shop/vacant").get()
} else {
featureDictionary
.byTags(element.tags)
Expand Down Expand Up @@ -169,7 +168,7 @@ class ShopsOverlayForm : AbstractOverlayForm() {
}

private fun setVacant() {
onSelectedFeature(createVacantShop(requireContext().resources))
onSelectedFeature(featureDictionary.byId("shop/vacant").get())
}

private fun createNoNameAnswer(): AnswerItem? =
Expand Down Expand Up @@ -312,10 +311,3 @@ private suspend fun createEditAction(
CreateNodeAction(geometry.center, tagChanges)
}
}

private fun createVacantShop(resources: Resources) = DummyFeature(
"shop/vacant",
resources.getString(R.string.vacant_shop_title),
"maki-shop",
mapOf("disused:shop" to "yes")
)
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,6 @@ Partially means that a wheelchair can enter and use the restroom, but no handrai

<string name="overlay_shops">Shops</string>
<string name="name_label">Name:</string>
<string name="vacant_shop_title">Vacant shop</string>
<!-- Used for places unknown by iD presets. Does not mean it is invalid. The wording that it is "unknown" is avoided so that the user does not think an action is necessary from him -->
<string name="unknown_shop_title">Other kind of place</string>
<string name="confirmation_replace_shop_title">"Is it a different place now?"</string>
Expand Down

0 comments on commit 7eabae9

Please sign in to comment.