Skip to content

Commit

Permalink
Merge branch 'release/1.6.26' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Dec 20, 2024
2 parents de6b7c5 + a0d1b2d commit c3fa399
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 72 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Changes in Element v1.6.26 (2024-12-20)
=======================================

Other changes
-------------
- Bump org.matrix.rustcomponents:crypto-android from 0.5.0 to 0.6.0 based on matrix-sdk-crypto-0.9.0 ([#8960](https://github.com/element-hq/element-android/issues/8960))


Changes in Element v1.6.24 (2024-11-19)
=======================================

Expand Down
8 changes: 3 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.9)
strscan
rexml (3.3.9)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -224,7 +223,6 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -239,13 +237,13 @@ GEM
unf_ext (0.0.9.1)
unicode-display_width (2.5.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/40106260.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Main changes in this version: crypto sdk upgrade.
Full changelog: https://github.com/element-hq/element-android/releases
4 changes: 2 additions & 2 deletions matrix-sdk-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'

buildConfigField "String", "SDK_VERSION", "\"1.6.24\""
buildConfigField "String", "SDK_VERSION", "\"1.6.26\""

buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
Expand Down Expand Up @@ -221,7 +221,7 @@ dependencies {

implementation libs.google.phonenumber

implementation("org.matrix.rustcomponents:crypto-android:0.5.0")
implementation("org.matrix.rustcomponents:crypto-android:0.6.0")
// api project(":library:rustCrypto")

testImplementation libs.tests.junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.matrix.android.sdk.internal.crypto.store.db.migration

import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.extensions.safeRemove
import org.matrix.android.sdk.internal.util.database.RealmMigrator

internal class MigrateCryptoTo024(realm: DynamicRealm) : RealmMigrator(realm, 24) {
Expand All @@ -32,20 +33,20 @@ internal class MigrateCryptoTo024(realm: DynamicRealm) : RealmMigrator(realm, 24
get("CryptoRoomEntity")?.removeField("outboundSessionInfo")

// Warning: order is important, first remove classes that depends on others.
remove("UserEntity")
remove("DeviceInfoEntity")
remove("CrossSigningInfoEntity")
remove("KeyInfoEntity")
remove("TrustLevelEntity")
remove("KeysBackupDataEntity")
remove("OlmInboundGroupSessionEntity")
remove("OlmSessionEntity")
remove("AuditTrailEntity")
remove("OutgoingKeyRequestEntity")
remove("KeyRequestReplyEntity")
remove("WithHeldSessionEntity")
remove("SharedSessionEntity")
remove("OutboundGroupSessionInfoEntity")
safeRemove("UserEntity")
safeRemove("DeviceInfoEntity")
safeRemove("CrossSigningInfoEntity")
safeRemove("KeyInfoEntity")
safeRemove("TrustLevelEntity")
safeRemove("KeysBackupDataEntity")
safeRemove("OlmInboundGroupSessionEntity")
safeRemove("OlmSessionEntity")
safeRemove("AuditTrailEntity")
safeRemove("OutgoingKeyRequestEntity")
safeRemove("KeyRequestReplyEntity")
safeRemove("WithHeldSessionEntity")
safeRemove("SharedSessionEntity")
safeRemove("OutboundGroupSessionInfoEntity")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.matrix.android.sdk.internal.extensions
import io.realm.RealmList
import io.realm.RealmObject
import io.realm.RealmObjectSchema
import io.realm.RealmSchema
import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEntityFields
import org.matrix.android.sdk.internal.util.fatalError

Expand Down Expand Up @@ -52,3 +53,9 @@ internal fun RealmObjectSchema?.forceRefreshOfHomeServerCapabilities(): RealmObj
obj.setLong(HomeServerCapabilitiesEntityFields.LAST_UPDATED_TIMESTAMP, 0)
}
}

internal fun RealmSchema.safeRemove(className: String) {
if (get(className) != null) {
remove(className)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ internal class UpdatedReplyDecorator(
val isRedactedEvent = timelineEventEntity.root?.asDomain()?.isRedacted() ?: false

val replyText = localEchoEventFactory
.bodyForReply(currentTimelineEvent.getLastMessageContent(), true).formattedText ?: ""
.bodyForReply(currentTimelineEvent.getLastMessageContent(), true).takeFormatted()

val newContent = localEchoEventFactory.createReplyTextContent(
timelineEventMapper.map(timelineEventEntity),
Expand Down
Loading

0 comments on commit c3fa399

Please sign in to comment.