Merge branch 'hotfix/1.4.25' into main
This commit is contained in:
commit
1f34d368a2
14
CHANGES.md
14
CHANGES.md
@ -1,3 +1,17 @@
|
||||
Changes in Element v1.4.25 (2022-06-27)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- Second attempt to fix session database migration to version 30.
|
||||
|
||||
Changes in Element v1.4.24 (2022-06-22)
|
||||
=======================================
|
||||
|
||||
Bugfixes 🐛
|
||||
----------
|
||||
- First attempt to fix session database migration to version 30.
|
||||
|
||||
Changes in Element v1.4.23 (2022-06-21)
|
||||
=======================================
|
||||
|
||||
|
2
fastlane/metadata/android/en-US/changelogs/40104250.txt
Normal file
2
fastlane/metadata/android/en-US/changelogs/40104250.txt
Normal file
@ -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
|
@ -56,7 +56,7 @@ android {
|
||||
// that the app's state is completely cleared between tests.
|
||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||
|
||||
buildConfigField "String", "SDK_VERSION", "\"1.4.24\""
|
||||
buildConfigField "String", "SDK_VERSION", "\"1.4.25\""
|
||||
|
||||
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
|
||||
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
|
||||
|
@ -20,8 +20,8 @@ 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
|
||||
import timber.log.Timber
|
||||
|
||||
/**
|
||||
* Migrating to:
|
||||
@ -35,16 +35,23 @@ internal class MigrateSessionTo030(realm: DynamicRealm) : RealmMigrator(realm, 3
|
||||
.equalTo(ChunkEntityFields.IS_LAST_FORWARD, false)
|
||||
.findAll()
|
||||
|
||||
val nbOfDeletedChunks = chunks.size
|
||||
var nbOfDeletedTimelineEvents = 0
|
||||
var nbOfDeletedEvents = 0
|
||||
chunks.forEach { chunk ->
|
||||
chunk.getList(ChunkEntityFields.TIMELINE_EVENTS.`$`).clearWith { timelineEvent ->
|
||||
val timelineEvents = chunk.getList(ChunkEntityFields.TIMELINE_EVENTS.`$`)
|
||||
timelineEvents.forEach { timelineEvent ->
|
||||
// Don't delete state events
|
||||
val event = timelineEvent.getObject(TimelineEventEntityFields.ROOT.`$`)
|
||||
if (event?.isNull(EventEntityFields.STATE_KEY) == true) {
|
||||
nbOfDeletedEvents++
|
||||
event.deleteFromRealm()
|
||||
timelineEvent.deleteFromRealm()
|
||||
}
|
||||
}
|
||||
chunk.deleteFromRealm()
|
||||
nbOfDeletedTimelineEvents += timelineEvents.size
|
||||
timelineEvents.deleteAllFromRealm()
|
||||
}
|
||||
chunks.deleteAllFromRealm()
|
||||
Timber.d("MigrateSessionTo030: $nbOfDeletedChunks deleted chunk(s), $nbOfDeletedTimelineEvents deleted TimelineEvent(s) and $nbOfDeletedEvents deleted Event(s).")
|
||||
}
|
||||
}
|
||||
|
@ -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 = 24
|
||||
ext.versionPatch = 25
|
||||
|
||||
static def getGitTimestamp() {
|
||||
def cmd = 'git show -s --format=%ct'
|
||||
|
Loading…
Reference in New Issue
Block a user