From b0ba62aa312c9847277f47489b7e892aa34cba3f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 18 Dec 2020 16:12:01 +0100 Subject: [PATCH] Use const --- .../sdk/internal/database/RealmSessionStoreMigration.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt index fd922ef0e5..57002b5a60 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt @@ -21,6 +21,7 @@ import io.realm.RealmMigration import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEntityFields import org.matrix.android.sdk.internal.database.model.PendingThreePidEntityFields import org.matrix.android.sdk.internal.database.model.PreviewUrlCacheEntityFields +import org.matrix.android.sdk.internal.database.model.RoomEntityFields import org.matrix.android.sdk.internal.database.model.RoomMembersLoadStatusType import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields import timber.log.Timber @@ -111,7 +112,7 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration { private fun migrateTo7(realm: DynamicRealm) { Timber.d("Step 6 -> 7") realm.schema.get("RoomEntity") - ?.addField("membersLoadStatusStr", String::class.java) + ?.addField(RoomEntityFields.MEMBERS_LOAD_STATUS_STR, String::class.java) ?.transform { obj -> if (obj.getBoolean("areAllMembersLoaded")) { obj.setString("membersLoadStatusStr", RoomMembersLoadStatusType.LOADED.name)