small code cleanup

No code behavior has been changed.
This commit is contained in:
2025-09-25 23:46:46 +02:00
parent be77c7fb22
commit 961e7b90e7
6 changed files with 47 additions and 47 deletions

View File

@@ -47,9 +47,9 @@ import java.util.Date
class MainActivity : AppCompatActivity() {
companion object {
val TAG = "MainActivity"
val UPDATE_EVERY_SECS: Long = 30
val DEBUG_CHECK_LOGBOOK_CONSISTENCY = false
const val TAG = "MainActivity"
const val UPDATE_EVERY_SECS: Long = 30
const val DEBUG_CHECK_LOGBOOK_CONSISTENCY = false
}
var logbook: Logbook? = null
@@ -113,24 +113,24 @@ class MainActivity : AppCompatActivity() {
moreButton.setOnClickListener {
showOverflowPopupWindow(moreButton)
}
findViewById<View>(R.id.button_no_connection_settings).setOnClickListener({
findViewById<View>(R.id.button_no_connection_settings).setOnClickListener {
showSettings()
})
findViewById<View>(R.id.button_settings).setOnClickListener({
}
findViewById<View>(R.id.button_settings).setOnClickListener {
showSettings()
})
findViewById<View>(R.id.button_no_connection_retry).setOnClickListener({
}
findViewById<View>(R.id.button_no_connection_retry).setOnClickListener {
// This may happen at start, when logbook is still null: better ask the logbook list
loadLogbookList()
})
findViewById<View>(R.id.button_sync).setOnClickListener({
}
findViewById<View>(R.id.button_sync).setOnClickListener {
loadLogbookList()
})
}
}
private fun setListAdapter(items: ArrayList<LunaEvent>) {
val adapter = LunaEventRecyclerAdapter(this, items)
adapter.onItemClickListener = object: LunaEventRecyclerAdapter.OnItemClickListener{
adapter.onItemClickListener = object: LunaEventRecyclerAdapter.OnItemClickListener {
override fun onItemClick(event: LunaEvent) {
showEventDetailDialog(event, items)
}