Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes being questions are not displayed as quests #4482

Closed
Strubbl opened this issue Oct 10, 2022 · 6 comments
Closed

Notes being questions are not displayed as quests #4482

Strubbl opened this issue Oct 10, 2022 · 6 comments
Labels

Comments

@Strubbl
Copy link
Contributor

Strubbl commented Oct 10, 2022

How to Reproduce
Open SC and go to e.g. this area: https://www.openstreetmap.org/#map=19/48.10945/11.72678&layers=N
The two notes, which are currently open there, contain a ?. Both are not displayed as quests when the option to show notes not phrased as a question is disabled.

Expected Behavior
I see the notes as a quest and can add a comment or photo comment there.

Versions affected
v47.1

(After comment #4482 (comment), this issue has been edited in order to be precise about the option to show notes not phrased as a question)

@Strubbl Strubbl added the bug label Oct 10, 2022
@Helium314
Copy link
Collaborator

Do you have the option to show notes not phrased as a question enabled?

@Strubbl
Copy link
Contributor Author

Strubbl commented Oct 10, 2022

Thank you for the pointer. You are right. This was disabled. Had the settings been reset? I am not aware that i disabled this setting. I always had that on.

@Strubbl Strubbl closed this as completed Oct 10, 2022
@FloEdelmann
Copy link
Member

But shouldn't it be asked anyway, because the note text actually contains a ??

private fun Note.probablyContainsQuestion(): Boolean {
/* from left to right (if smartass IntelliJ wouldn't mess up left-to-right):
- latin question mark
- greek question mark (a different character than semikolon, though same appearance)
- semikolon (often used instead of proper greek question mark)
- mirrored question mark (used in script written from right to left, like Arabic)
- armenian question mark
- ethopian question mark
- full width question mark (often used in modern Chinese / Japanese)
(Source: https://en.wikipedia.org/wiki/Question_mark)
NOTE: some languages, like Thai, do not use any question mark, so this would be more
difficult to determine.
*/
val questionMarksAroundTheWorld = "[?;;؟՞፧?]"
val text = comments.firstOrNull()?.text
return text?.matches(".*$questionMarksAroundTheWorld.*".toRegex()) ?: false
}

@Strubbl
Copy link
Contributor Author

Strubbl commented Oct 10, 2022

Valid point. Both texts of the notes contain a ?. I am going to re-word my original post to match this.

@Strubbl Strubbl reopened this Oct 10, 2022
@Strubbl Strubbl changed the title Note quests are not displayed Notes being questions are not displayed as quests Oct 10, 2022
@mnalis
Copy link
Member

mnalis commented Oct 10, 2022

More importantly, Show all notes, even when checked, will not actually show all notes.
Most notably, it will not show your own new notes:

/* newly created notes by user should not be shown if it was both created in this app and has no
replies yet */
if (probablyCreatedByUserInThisApp(userId) && !hasReplies) return false

I've suggested to implement an option to allow user to view his own notes before (#2692) but it has sadly been rejected.

@Strubbl
Copy link
Contributor Author

Strubbl commented Oct 10, 2022

@mnalis thank you. I guess this is off-topic of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants