2 Commits

View File

@@ -557,7 +557,7 @@ class MainActivity : AppCompatActivity() {
val nextTextView = dialogView.findViewById<TextView>(R.id.notes_template_next)
val prevTextView = dialogView.findViewById<TextView>(R.id.notes_template_prev)
val templates = getAllEvents().filter { it.type == event.type }.distinctBy { it.notes.trim() }.sortedBy { it.time }
val templates = getAllEvents().filter { it.type == event.type }.distinctBy { it.notes }.sortedBy { it.time }
fun updateContent(current: LunaEvent) {
val prevEvent = getPreviousSameEvent(current, templates)
@@ -612,7 +612,7 @@ class MainActivity : AppCompatActivity() {
updateContent(event)
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
val notes = notesET.text.toString()
val notes = notesET.text.toString().trim()
if (useQuantity) {
val quantity = qtyET.text.toString().toIntOrNull()