Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50 (#3565)

* Adapt to changes in the SDK

* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50

* Use lambda instead of overriding the `EventDebugInfoProvider` interface

* Fix test proposal.
We may find a better way to compare data class instance if we need to do more comparison in the future...

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
renovate[bot] 2024-10-01 09:44:52 +02:00 committed by GitHub
parent 249104bf38
commit 3001efb525
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 216 additions and 175 deletions

View file

@ -103,7 +103,7 @@ class FakeMatrixRoom(
private val updateUserRoleResult: () -> Result<Unit> = { lambdaError() },
private val toggleReactionResult: (String, UniqueId) -> Result<Unit> = { _, _ -> lambdaError() },
private val retrySendMessageResult: (TransactionId) -> Result<Unit> = { lambdaError() },
private val cancelSendResult: (TransactionId) -> Result<Boolean> = { lambdaError() },
private val cancelSendResult: (TransactionId) -> Result<Unit> = { lambdaError() },
private val forwardEventResult: (EventId, List<RoomId>) -> Result<Unit> = { _, _ -> lambdaError() },
private val reportContentResult: (EventId, String, UserId?) -> Result<Unit> = { _, _, _ -> lambdaError() },
private val kickUserResult: (UserId, String?) -> Result<Unit> = { _, _ -> lambdaError() },
@ -233,7 +233,7 @@ class FakeMatrixRoom(
return retrySendMessageResult(transactionId)
}
override suspend fun cancelSend(transactionId: TransactionId): Result<Boolean> {
override suspend fun cancelSend(transactionId: TransactionId): Result<Unit> {
return cancelSendResult(transactionId)
}

View file

@ -63,15 +63,15 @@ class FakeTimeline(
intentionalMentions: List<IntentionalMention>,
): Result<Unit> = sendMessageLambda(body, htmlBody, intentionalMentions)
var redactEventLambda: (eventId: EventId?, transactionId: TransactionId?, reason: String?) -> Result<Boolean> = { _, _, _ ->
Result.success(true)
var redactEventLambda: (eventId: EventId?, transactionId: TransactionId?, reason: String?) -> Result<Unit> = { _, _, _ ->
Result.success(Unit)
}
override suspend fun redactEvent(
eventId: EventId?,
transactionId: TransactionId?,
reason: String?
): Result<Boolean> = redactEventLambda(eventId, transactionId, reason)
): Result<Unit> = redactEventLambda(eventId, transactionId, reason)
var editMessageLambda: (
originalEventId: EventId?,
@ -217,7 +217,7 @@ class FakeTimeline(
var forwardEventLambda: (eventId: EventId, roomIds: List<RoomId>) -> Result<Unit> = { _, _ -> Result.success(Unit) }
override suspend fun forwardEvent(eventId: EventId, roomIds: List<RoomId>): Result<Unit> = forwardEventLambda(eventId, roomIds)
override suspend fun cancelSend(transactionId: TransactionId): Result<Boolean> = redactEvent(null, transactionId, null)
override suspend fun cancelSend(transactionId: TransactionId): Result<Unit> = redactEvent(null, transactionId, null)
var sendLocationLambda: (
body: String,

View file

@ -66,9 +66,9 @@ fun anEventTimelineItem(
senderProfile = senderProfile,
timestamp = timestamp,
content = content,
debugInfo = debugInfo,
debugInfoProvider = { debugInfo },
origin = null,
messageShield = messageShield,
messageShieldProvider = { messageShield },
)
fun aProfileTimelineDetails(