Skip to content
Snippets Groups Projects
Commit 787bb776 authored by Benoit Marty's avatar Benoit Marty
Browse files

Merge branch 'release/1.3.14' into develop

parents 3829d8d6 aee72b9e
No related branches found
No related tags found
No related merge requests found
Please also refer to the Changelog of Element Android: https://github.com/vector-im/element-android/blob/main/CHANGES.md
Changes in Matrix-SDK 1.3.14 (2022-01-12)
===================================================
Imported from Element 1.3.14. (https://github.com/vector-im/element-android/releases/tag/v1.3.14)
Changes in Matrix-SDK 1.3.13 (2022-01-11)
===================================================
......
......@@ -26,7 +26,7 @@ vector.httpLogLevel=NONE
# Ref: https://github.com/vanniktech/gradle-maven-publish-plugin
GROUP=org.matrix.android
POM_ARTIFACT_ID=matrix-android-sdk2
VERSION_NAME=1.3.13
VERSION_NAME=1.3.14
POM_PACKAGING=aar
......
......@@ -578,7 +578,7 @@ internal class DefaultCryptoService @Inject constructor(
// (for now at least. Maybe we should alert the user somehow?)
val existingAlgorithm = cryptoStore.getRoomAlgorithm(roomId)
if (existingAlgorithm == algorithm) {
if (existingAlgorithm == algorithm && roomEncryptorsStore.get(roomId) != null) {
// ignore
Timber.tag(loggerTag.value).e("setEncryptionInRoom() : Ignoring m.room.encryption for same alg ($algorithm) in $roomId")
return false
......
......@@ -30,8 +30,8 @@ internal fun TimelineEventEntity.Companion.nextId(realm: Realm): Long {
}
internal fun TimelineEventEntity.isMoreRecentThan(eventToCheck: TimelineEventEntity): Boolean {
val currentChunk = this.chunk?.first() ?: return false
val chunkToCheck = eventToCheck.chunk?.firstOrNull() ?: return false
val currentChunk = this.chunk?.first(null) ?: return false
val chunkToCheck = eventToCheck.chunk?.first(null) ?: return false
return if (currentChunk == chunkToCheck) {
this.displayIndex >= eventToCheck.displayIndex
} else {
......
......@@ -51,7 +51,7 @@ internal class DefaultRoomGetter @Inject constructor(
.equalTo(RoomSummaryEntityFields.IS_DIRECT, true)
.equalTo(RoomSummaryEntityFields.MEMBERSHIP_STR, Membership.JOIN.name)
.findAll()
.firstOrNull { dm -> dm.otherMemberIds.size == 1 && dm.otherMemberIds.first() == otherUserId }
.firstOrNull { dm -> dm.otherMemberIds.size == 1 && dm.otherMemberIds.first(null) == otherUserId }
?.roomId
}
}
......
......@@ -426,9 +426,9 @@ internal class TimelineChunk(private val chunkEntity: ChunkEntity,
if (initialEventId != null) {
frozenTimelineEvents.where().equalTo(TimelineEventEntityFields.EVENT_ID, initialEventId).findFirst()?.displayIndex
} else if (direction == Timeline.Direction.BACKWARDS) {
frozenTimelineEvents.first()?.displayIndex
frozenTimelineEvents.first(null)?.displayIndex
} else {
frozenTimelineEvents.last()?.displayIndex
frozenTimelineEvents.last(null)?.displayIndex
}
} else if (direction == Timeline.Direction.FORWARDS) {
builtEvents.first().displayIndex + 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment