From a525ede25d2a9444c0dd1ddc05f87cd23f11178c Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 22 Jun 2022 11:56:54 +0200 Subject: [PATCH 1/2] Fix migration to 30. Seems that `isNull` with long path is not working correctly. --- .../sdk/internal/database/migration/MigrateSessionTo030.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo030.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo030.kt index 3f7e2ef36a..f9c4a8b642 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo030.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/migration/MigrateSessionTo030.kt @@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.database.migration import io.realm.DynamicRealm import org.matrix.android.sdk.internal.database.model.ChunkEntityFields +import org.matrix.android.sdk.internal.database.model.EventEntityFields import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields import org.matrix.android.sdk.internal.extensions.clearWith import org.matrix.android.sdk.internal.util.database.RealmMigrator @@ -37,8 +38,9 @@ internal class MigrateSessionTo030(realm: DynamicRealm) : RealmMigrator(realm, 3 chunks.forEach { chunk -> chunk.getList(ChunkEntityFields.TIMELINE_EVENTS.`$`).clearWith { timelineEvent -> // Don't delete state events - if (timelineEvent.isNull(TimelineEventEntityFields.ROOT.STATE_KEY)) { - timelineEvent.getObject(TimelineEventEntityFields.ROOT.`$`)?.deleteFromRealm() + val event = timelineEvent.getObject(TimelineEventEntityFields.ROOT.`$`) + if (event?.isNull(EventEntityFields.STATE_KEY) == true) { + event.deleteFromRealm() timelineEvent.deleteFromRealm() } } From 8ada26529afc5bf5431a0d5da0eb71107e6d9b22 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 22 Jun 2022 12:36:39 +0100 Subject: [PATCH 2/2] updating version for 1.4.24 hotfix - is a hotfix for 1.4.22 --- fastlane/metadata/android/en-US/changelogs/40104240.txt | 2 ++ matrix-sdk-android/build.gradle | 2 +- vector/build.gradle | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/40104240.txt diff --git a/fastlane/metadata/android/en-US/changelogs/40104240.txt b/fastlane/metadata/android/en-US/changelogs/40104240.txt new file mode 100644 index 0000000000..61db61727a --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40104240.txt @@ -0,0 +1,2 @@ +Main changes in this version: Various bug fixes and stability improvements. +Full changelog: https://github.com/vector-im/element-android/releases diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index 69badf32d9..034b549d85 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -56,7 +56,7 @@ android { // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - buildConfigField "String", "SDK_VERSION", "\"1.4.23\"" + buildConfigField "String", "SDK_VERSION", "\"1.4.24\"" buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\"" buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\"" diff --git a/vector/build.gradle b/vector/build.gradle index ada3e3ca25..ae909bf513 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -31,7 +31,7 @@ ext.versionMinor = 4 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -ext.versionPatch = 23 +ext.versionPatch = 24 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct'