Add default value for Message.sendAsGroup and restore compactOnLaunch optimization

Co-authored-by: octoshrimpy <7097172+octoshrimpy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-11 03:37:33 +00:00
parent 77759f53b9
commit 4d41491ee7
2 changed files with 4 additions and 0 deletions
@@ -9,6 +9,7 @@ object RealmConfig {
private val config: RealmConfiguration by lazy {
RealmConfiguration.Builder()
.compactOnLaunch()
.schemaVersion(AppRealmMigration.SCHEMA_VERSION)
.migration(AppRealmMigration())
.build()
@@ -23,6 +23,9 @@ class AppRealmMigration : RealmMigration {
realm.schema.get("Message")
?.addField("sendAsGroup", Boolean::class.java, FieldAttribute.REQUIRED)
?.transform { obj ->
obj.setBoolean("sendAsGroup", false)
}
version = 11L
}