Skip to content

Commit

Permalink
hide "outdoor" answer if there is no outdoor seating
Browse files Browse the repository at this point in the history
as reported in streetcomplete#3856
  • Loading branch information
mnalis committed Mar 10, 2022
1 parent d6c5d48 commit 0e3e753
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ class SmokingAllowedAnswerForm : AListQuestAnswerFragment<SmokingAllowed>() {
val isAlreadyOutdoor =
tags["leisure"] == "outdoor_seating" || tags["amenity"] == "biergarten" ||
(tags["outdoor_seating"] == "yes" && tags["indoor_seating"] == "no")
val noOutdoorSeating = tags["outdoor_seating"] == "no"

return listOfNotNull(
TextItem(NO, R.string.quest_smoking_no),
if (isAlreadyOutdoor) null else TextItem(OUTSIDE, R.string.quest_smoking_outside),
if (isAlreadyOutdoor || noOutdoorSeating) null else TextItem(OUTSIDE, R.string.quest_smoking_outside),
TextItem(SEPARATED, R.string.quest_smoking_separated),
TextItem(YES, R.string.quest_smoking_yes),
)
Expand Down

0 comments on commit 0e3e753

Please sign in to comment.