refactor: use UPDATE_EVERY_SECS for regular update

Before, it was used to define the initial update.
This change does not change the behavior.
This commit is contained in:
2026-11-10 12:25:30 +01:00
parent 75d02a8548
commit 85a026e93a
@@ -50,7 +50,7 @@ import java.util.Date
class MainActivity : AppCompatActivity() { class MainActivity : AppCompatActivity() {
companion object { companion object {
const val TAG = "MainActivity" const val TAG = "MainActivity"
const val UPDATE_EVERY_SECS: Long = 30 const val UPDATE_EVERY_SECS: Long = 60
const val DEBUG_CHECK_LOGBOOK_CONSISTENCY = false const val DEBUG_CHECK_LOGBOOK_CONSISTENCY = false
// list of all events // list of all events
var allEvents = arrayListOf<LunaEvent>() var allEvents = arrayListOf<LunaEvent>()
@@ -69,7 +69,7 @@ class MainActivity : AppCompatActivity() {
val updateListRunnable: Runnable = Runnable { val updateListRunnable: Runnable = Runnable {
if (logbook != null && !pauseLogbookUpdate) if (logbook != null && !pauseLogbookUpdate)
loadLogbook(logbook!!.name) loadLogbook(logbook!!.name)
handler.postDelayed(updateListRunnable, 1000 * 60) handler.postDelayed(updateListRunnable, 1000 * 30)
} }
var logbookRepo: LogbookRepository? = null var logbookRepo: LogbookRepository? = null
var showingOverflowPopupWindow = false var showingOverflowPopupWindow = false