Compare commits
1 Commits
ba4e3a9e94
...
7ba58cadd3
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ba58cadd3 |
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user