From e1388f9bad6c3c8da21ddcab25367480e1bc5034 Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Wed, 8 Jan 2025 07:35:02 +0100 Subject: [PATCH] Consistency check --- .../it/danieleverducci/lunatracker/MainActivity.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/it/danieleverducci/lunatracker/MainActivity.kt b/app/src/main/java/it/danieleverducci/lunatracker/MainActivity.kt index 97a0b1b..3cefd95 100644 --- a/app/src/main/java/it/danieleverducci/lunatracker/MainActivity.kt +++ b/app/src/main/java/it/danieleverducci/lunatracker/MainActivity.kt @@ -30,7 +30,6 @@ import it.danieleverducci.lunatracker.repository.WebDAVLogbookRepository import kotlinx.coroutines.Runnable import okio.IOException import org.json.JSONException -import utils.DateUtils import utils.NumericUtils import java.text.DateFormat import java.util.Date @@ -39,6 +38,7 @@ class MainActivity : AppCompatActivity() { companion object { val TAG = "MainActivity" val UPDATE_EVERY_SECS: Long = 30 + val DEBUG_CHECK_LOGBOOK_CONSISTENCY = false } lateinit var logbook: Logbook @@ -295,6 +295,15 @@ class MainActivity : AppCompatActivity() { findViewById(R.id.no_connection_screen).visibility = View.GONE logbook = lb showLogbook() + + if (DEBUG_CHECK_LOGBOOK_CONSISTENCY) { + for (e in logbook.logs) { + val em = e.getTypeEmoji(this@MainActivity) + if (em == getString(R.string.event_unknown_type)) { + Log.e(TAG, "UNKNOWN: ${e.type}") + } + } + } }) }