1 Commits

Author SHA1 Message Date
f8bd760f7a events: allow editing of all used values
Allow to change the date/time and
other relevant values of an event
on creation and after it was created.
2025-11-11 23:15:09 +01:00

View File

@@ -78,7 +78,7 @@ class MainActivity : AppCompatActivity() {
progressIndicator = findViewById(R.id.progress_indicator)
buttonsContainer = findViewById(R.id.buttons_container)
recyclerView = findViewById(R.id.list_events)
recyclerView.setLayoutManager(LinearLayoutManager(this))
recyclerView.setLayoutManager(LinearLayoutManager(applicationContext))
// Set listeners
findViewById<View>(R.id.logbooks_add_button).setOnClickListener {
@@ -637,8 +637,8 @@ class MainActivity : AppCompatActivity() {
val previousTextView = dialogView.findViewById<TextView>(R.id.dialog_event_previous)
val previousEvent = getPreviousSameEvent(event, allEvents)
if (previousEvent != null) {
val emoji = previousEvent.getTypeEmoji(this)
val time = DateUtils.formatTimeDuration(this, event.time - previousEvent.time)
val emoji = previousEvent.getTypeEmoji(applicationContext)
val time = DateUtils.formatTimeDuration(applicationContext, event.time - previousEvent.time)
previousTextView.text = String.format("⬅️ %s %s", emoji, time)
previousTextView.setOnClickListener {
alertDialog.cancel()
@@ -652,8 +652,8 @@ class MainActivity : AppCompatActivity() {
val nextTextView = dialogView.findViewById<TextView>(R.id.dialog_event_next)
val nextEvent = getNextSameEvent(event, allEvents)
if (nextEvent != null) {
val emoji = nextEvent.getTypeEmoji(this)
val time = DateUtils.formatTimeDuration(this, nextEvent.time - event.time)
val emoji = nextEvent.getTypeEmoji(applicationContext)
val time = DateUtils.formatTimeDuration(applicationContext, nextEvent.time - event.time)
nextTextView.text = String.format("%s %s ➡️", time, emoji)
nextTextView.setOnClickListener {
alertDialog.cancel()