1 Commits

Author SHA1 Message Date
7ba58cadd3 notes: add icons to use previous/next event as template 2025-11-09 21:02:07 +01:00

View File

@@ -303,17 +303,13 @@ class MainActivity : AppCompatActivity() {
fun updateContent(current: LunaEvent) {
val prevEvent = getPreviousSameEvent(current, allEvents)
var nextEvent = getNextSameEvent(current, allEvents)
val nextEvent = getNextSameEvent(current, allEvents)
notesET.setText(current.notes)
if (useQuantity) {
qtyET.setText(current.quantity.toString())
}
if (nextEvent == null && current != lunaEvent) {
nextEvent = lunaEvent
}
if (nextEvent != null) {
nextTextView.setOnClickListener {
notesET.setText(nextEvent.notes)
@@ -326,6 +322,12 @@ class MainActivity : AppCompatActivity() {
} else {
nextTextView.setOnClickListener {}
nextTextView.alpha = 0.5f
// clear fields
notesET.setText("")
if (useQuantity) {
qtyET.setText("")
}
}
if (prevEvent != null) {