Compare commits

..
1 Commits
Author SHA1 Message Date
mwarning bfbf030361 NumericUtils: format food as weight 2026-11-06 23:48:06 +01:00
2 changed files with 3 additions and 2 deletions
@@ -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 = 60 const val UPDATE_EVERY_SECS: Long = 30
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 * 30) handler.postDelayed(updateListRunnable, 1000 * 60)
} }
var logbookRepo: LogbookRepository? = null var logbookRepo: LogbookRepository? = null
var showingOverflowPopupWindow = false var showingOverflowPopupWindow = false
+1
View File
@@ -96,6 +96,7 @@ class NumericUtils (val context: Context) {
LunaEvent.Type.BABY_BOTTLE -> measurement_unit_liquid_base LunaEvent.Type.BABY_BOTTLE -> measurement_unit_liquid_base
LunaEvent.Type.WEIGHT -> measurement_unit_weight_base LunaEvent.Type.WEIGHT -> measurement_unit_weight_base
LunaEvent.Type.HEIGHT -> measurement_unit_height_base LunaEvent.Type.HEIGHT -> measurement_unit_height_base
LunaEvent.Type.FOOD -> measurement_unit_weight_base
LunaEvent.Type.MEDICINE -> measurement_unit_weight_tiny LunaEvent.Type.MEDICINE -> measurement_unit_weight_tiny
LunaEvent.Type.TEMPERATURE -> measurement_unit_temperature_base LunaEvent.Type.TEMPERATURE -> measurement_unit_temperature_base
else -> "" else -> ""