forked from upstream-mirrors/quik
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user