-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/300 musical notes #310
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
...rc/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/github/braillesystems/learnbraille/ui/screens/browser/MarkerViewFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/braillesystems/learnbraille/ui/screens/practice/CardFragment.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found a lack of the database migration.
Thank you for the following my recommendations!
text = noteDurationTemplate.format(text, getString(noteDuration.titleStrId)) | ||
durationButton.visibility = View.VISIBLE | ||
durationButton.setOnClickListener { | ||
chooseNoteDurationDialog(brailleDots = dots, block = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a block is the last function param is a lambda, it can be moved outside the parentheses:
chooseNoteDurationDialog(brailleDots = dots) {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -34,7 +34,32 @@ enum class MarkerType { | |||
LatinSmall, | |||
BoldFont, | |||
ItalicFont, | |||
NumberSign | |||
NumberSign, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should write a simple database migration to update material data for users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I write it later? The course will change before the release. Or it will be a separate migration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, we just should not forget about it
@@ -104,7 +105,13 @@ class CardFragment : AbstractFragmentWithHelp(R.string.practice_help) { | |||
is MarkerSymbol -> { | |||
binding.letter.visibility = View.GONE | |||
binding.markerDescription.visibility = View.VISIBLE | |||
binding.markerDescription.text = inputMarkerPrintRules[it.type] | |||
val baseDescription = inputMarkerPrintRules[it.type] | |||
binding.markerDescription.text = when (it.type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to write if
expression if when
has only two branches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
) { | ||
val input = RadioGroup(context) | ||
var noteDuration = NoteDuration.EIGHTH | ||
NoteDuration.values().map { duration -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map
return value is not used here, so it is better to use forEach
extension function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed this, thanks
}) | ||
} | ||
|
||
AlertDialog.Builder(context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Ok
button unnecessary here? It looks like it is redundant and the only choice is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
@@ -34,7 +34,32 @@ enum class MarkerType { | |||
LatinSmall, | |||
BoldFont, | |||
ItalicFont, | |||
NumberSign | |||
NumberSign, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, we just should not forget about it
closes #300
I've added notes, and other symbols, too.
For notes, I've implemented a special mode in Browser where you can select the note duration and play the tune.