mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 11:59:12 +03:00
Changes migration to be realm list field
This commit is contained in:
parent
e003bc973a
commit
98d195c010
2 changed files with 3 additions and 4 deletions
|
@ -24,7 +24,7 @@ internal class MigrateSessionTo032(realm: DynamicRealm) : RealmMigrator(realm, 3
|
|||
|
||||
override fun doMigrate(realm: DynamicRealm) {
|
||||
realm.schema.get("RoomSummaryEntity")
|
||||
?.addField(RoomSummaryEntityFields.DIRECT_PARENT_NAMES.`$`, String::class.java)
|
||||
?.addRealmListField(RoomSummaryEntityFields.DIRECT_PARENT_NAMES.`$`, String::class.java)
|
||||
?.transform { it.setString(RoomSummaryEntityFields.DIRECT_PARENT_NAMES.`$`, "") }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@ internal open class RoomSummaryEntity(
|
|||
@PrimaryKey var roomId: String = "",
|
||||
var roomType: String? = null,
|
||||
var parents: RealmList<SpaceParentSummaryEntity> = RealmList(),
|
||||
var children: RealmList<SpaceChildSummaryEntity> = RealmList()
|
||||
var children: RealmList<SpaceChildSummaryEntity> = RealmList(),
|
||||
var directParentNames: RealmList<String> = RealmList(),
|
||||
) : RealmObject() {
|
||||
|
||||
private var displayName: String? = ""
|
||||
|
@ -235,8 +236,6 @@ internal open class RoomSummaryEntity(
|
|||
if (value != field) field = value
|
||||
}
|
||||
|
||||
var directParentNames: RealmList<String> = RealmList()
|
||||
|
||||
var flattenParentIds: String? = null
|
||||
set(value) {
|
||||
if (value != field) field = value
|
||||
|
|
Loading…
Reference in a new issue