Skip to content

Commit ec068ae

Browse files
author
Rob
committed
fix(telegram): restore in-place editing with proper v0→v1 migration
The previous removal of migration logic left existing users stuck with refreshInPlaceEnabled=false in stored data. Add back the migration to restore old data (v0) to the original intended default of true, while preserving v1+ data as-is. Without this, users see separate messages instead of one bubble being edited in place (5.4 → 5.3 → 5.7 should be edits, not 4 messages).
1 parent 041dfc4 commit ec068ae

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,12 @@ object OutboundApiSettings {
621621
refreshInPlaceEnabled = item.optBoolean(
622622
"refreshInPlaceEnabled",
623623
DEFAULT_REFRESH_IN_PLACE_ENABLED
624-
),
624+
).let { stored ->
625+
// v0→v1 migration: restore edit-in-place that was incorrectly forced false.
626+
// Old data should have true (the original default); only preserve stored
627+
// value for v1+ data (user's explicit choice).
628+
if (itemSettingsVersion < 1) true else stored
629+
},
625630
refreshWindowMinutes = item.optInt(
626631
"refreshWindowMinutes",
627632
DEFAULT_REFRESH_WINDOW_MINUTES

0 commit comments

Comments
 (0)