forked from penguin86/luna-tracker
Compare commits
2 Commits
19774016e1
...
f8f5d68bb6
| Author | SHA1 | Date | |
|---|---|---|---|
| f8f5d68bb6 | |||
| 280d4558ad |
@@ -557,7 +557,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
val nextTextView = dialogView.findViewById<TextView>(R.id.notes_template_next)
|
val nextTextView = dialogView.findViewById<TextView>(R.id.notes_template_next)
|
||||||
val prevTextView = dialogView.findViewById<TextView>(R.id.notes_template_prev)
|
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) {
|
fun updateContent(current: LunaEvent) {
|
||||||
val prevEvent = getPreviousSameEvent(current, templates)
|
val prevEvent = getPreviousSameEvent(current, templates)
|
||||||
@@ -612,7 +612,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
updateContent(event)
|
updateContent(event)
|
||||||
|
|
||||||
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
|
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
|
||||||
val notes = notesET.text.toString()
|
val notes = notesET.text.toString().trim()
|
||||||
|
|
||||||
if (useQuantity) {
|
if (useQuantity) {
|
||||||
val quantity = qtyET.text.toString().toIntOrNull()
|
val quantity = qtyET.text.toString().toIntOrNull()
|
||||||
|
|||||||
Reference in New Issue
Block a user