From b99ee2ce9dabd01f228d8d5afa93d6f85b0d9667 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Fri, 26 Jun 2020 16:26:55 +0200 Subject: [PATCH] add alias to can't say about nonexisting objects It turns out that many users were especially confused about questions referring to nonexisting objects and were unaware that the proper solution is to create a note (though many of them figured this out) this change will guide them toward note feature as applicable in case of nonexisting objects main negative is increased complexity and more work for translators but as this confusion is quite widespread (mentioned both in talks with more experienced mappers and revealed in testing with newbies) it seems to be a worth doing fixes #1673 fixes #1097 using a different method --- .../quests/AbstractQuestAnswerFragment.kt | 11 +++++++++++ app/src/main/res/values/strings.xml | 3 +++ 2 files changed, 14 insertions(+) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt index 74e88740bf0..94d929bc588 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt @@ -186,6 +186,8 @@ abstract class AbstractQuestAnswerFragment : AbstractBottomSheetFragment(), I val cantSay = OtherAnswer(R.string.quest_generic_answer_notApplicable) { onClickCantSay() } answers.add(cantSay) + val notExistingAnymore = OtherAnswer(R.string.quest_generic_answer_notExisting) { onClickNotExisting() } + answers.add(notExistingAnymore) val way = osmElement as? Way if (way != null) { @@ -267,6 +269,15 @@ abstract class AbstractQuestAnswerFragment : AbstractBottomSheetFragment(), I } } + protected fun onClickNotExisting() { + context?.let { AlertDialog.Builder(it) + .setTitle(R.string.quest_leave_new_note_title) + .setMessage(R.string.quest_leave_new_note_about_nonexisting_object_description) + .setNegativeButton(R.string.quest_leave_new_note_no) { _, _ -> skipQuest() } + .setPositiveButton(R.string.quest_leave_new_note_yes) { _, _ -> composeNote() } + .show() + } + } protected fun composeNote() { val questTitle = englishResources.getQuestTitle(questType, osmElement, featureDictionaryFuture) listener?.onComposeNote(questId, questGroup, questTitle) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2889e73cb1e..46d2b1d0b12 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -35,12 +35,15 @@ "© OpenStreetMap contributors" "Other answers…" "Can’t say…" + "Does not exist…" "Are you sure?" "Yes, I am sure" "I will check" "You left this field empty" "Leave a note instead?" "You can leave a public note at this location which other mappers can comment on and hopefully resolve or alternatively just hide the quest for yourself only" + "Please, leave a note" + "Questions may be asked about objects that are not existing. It happens when OpenStreetMap contains wrong or outdated info. You can leave a public note at this location with explanation what is wrong or alternatively just hide the quest for yourself only." "OK" "No, just hide" Attach photo