Skip to content

Commit 041dfc4

Browse files
author
Rob
committed
fix(telegram): restore edit-in-place bubble refresh for normal readings
DEFAULT_REFRESH_IN_PLACE_ENABLED should be true so normal glucose readings edit the existing bubble in place (no spam, one message per destination). Missed/stale readings are handled separately and sent as new messages. Revert the overly broad disabling of edit-in-place that prevented normal readings from being edited efficiently. Remove the v0→v1 migration forcing false since the default is back to true.
1 parent 962a0aa commit 041dfc4

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

Common/src/main/java/tk/glucodata/OutboundApiSettings.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ object OutboundApiSettings {
5050
const val TRIGGER_OUTSIDE_RANGE = "outside_range"
5151
const val DEFAULT_TRIGGER_LOW_MGDL = 70
5252
const val DEFAULT_TRIGGER_HIGH_MGDL = 180
53-
const val DEFAULT_REFRESH_IN_PLACE_ENABLED = false
53+
const val DEFAULT_REFRESH_IN_PLACE_ENABLED = true
5454
const val DEFAULT_REFRESH_WINDOW_MINUTES = 15
5555
const val DEFAULT_SUPPRESS_DELTA_BELOW_MGDL = 1
5656
const val DEFAULT_STALE_ENABLED = true
@@ -621,13 +621,7 @@ object OutboundApiSettings {
621621
refreshInPlaceEnabled = item.optBoolean(
622622
"refreshInPlaceEnabled",
623623
DEFAULT_REFRESH_IN_PLACE_ENABLED
624-
).let { stored ->
625-
// v0→v1 migration: old default was true, which silently broke notifications
626-
// since Telegram doesn't notify on edited messages. Force false on first
627-
// migration. Once settingsVersion is saved as 1+, user's explicit choices
628-
// are preserved.
629-
stored && itemSettingsVersion >= 1
630-
},
624+
),
631625
refreshWindowMinutes = item.optInt(
632626
"refreshWindowMinutes",
633627
DEFAULT_REFRESH_WINDOW_MINUTES

0 commit comments

Comments
 (0)