diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt index ef571e12b3..23253a2033 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt @@ -83,7 +83,7 @@ import kotlin.time.Duration.Companion.seconds @Test fun `present - with CallType RoomCall sets call as active, loads URL, runs WidgetDriver and notifies the other clients a call started`() = runTest { - val sendCallNotificationIfNeededLambda = lambdaRecorder> { Result.success(Unit) } + val sendCallNotificationIfNeededLambda = lambdaRecorder> { Result.success(true) } val syncService = FakeSyncService(SyncState.Running) val fakeRoom = FakeJoinedRoom(sendCallNotificationIfNeededResult = sendCallNotificationIfNeededLambda) val client = FakeMatrixClient(syncService = syncService).apply { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 99127f094e..d4db6807c4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -172,7 +172,7 @@ jsoup = "org.jsoup:jsoup:1.20.1" appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" } molecule-runtime = "app.cash.molecule:molecule-runtime:2.1.0" timber = "com.jakewharton.timber:timber:5.0.1" -matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.6.6" +matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.6.10" matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" } matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" } sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/JoinedRoom.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/JoinedRoom.kt index 4373721b70..4528c75b1d 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/JoinedRoom.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/JoinedRoom.kt @@ -159,7 +159,7 @@ interface JoinedRoom : BaseRoom { /** * Send an Element Call started notification if needed. */ - suspend fun sendCallNotificationIfNeeded(): Result + suspend fun sendCallNotificationIfNeeded(): Result suspend fun setSendQueueEnabled(enabled: Boolean) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/JoinedRustRoom.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/JoinedRustRoom.kt index 18e6571a27..34ff4042cc 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/JoinedRustRoom.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/JoinedRustRoom.kt @@ -161,14 +161,16 @@ class JoinedRustRoom( maxEventsToLoad = 100u, maxConcurrentRequests = 10u, ) - is CreateTimelineParams.MediaOnly -> TimelineFocus.Live + is CreateTimelineParams.MediaOnly -> TimelineFocus.Live(hideThreadedEvents = false) is CreateTimelineParams.Focused -> TimelineFocus.Event( eventId = createTimelineParams.focusedEventId.value, numContextEvents = 50u, + hideThreadedEvents = false, ) is CreateTimelineParams.MediaOnlyFocused -> TimelineFocus.Event( eventId = createTimelineParams.focusedEventId.value, numContextEvents = 50u, + hideThreadedEvents = false, ) } @@ -427,7 +429,7 @@ class JoinedRustRoom( } } - override suspend fun sendCallNotificationIfNeeded(): Result = withContext(roomDispatcher) { + override suspend fun sendCallNotificationIfNeeded(): Result = withContext(roomDispatcher) { runCatchingExceptions { innerRoom.sendCallNotificationIfNeeded() } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustRoomFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustRoomFactory.kt index 4ea1611b38..c842c25876 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustRoomFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustRoomFactory.kt @@ -110,7 +110,7 @@ class RustRoomFactory( // Init the live timeline in the SDK from the Room val timeline = sdkRoom.timelineWithConfiguration( TimelineConfiguration( - focus = TimelineFocus.Live, + focus = TimelineFocus.Live(hideThreadedEvents = false), filter = eventFilters?.let(TimelineFilter::EventTypeFilter) ?: TimelineFilter.All, internalIdPrefix = "live", dateDividerMode = DateDividerMode.DAILY, diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/FakeJoinedRoom.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/FakeJoinedRoom.kt index 64d0a800d6..ff7a1ddc26 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/FakeJoinedRoom.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/FakeJoinedRoom.kt @@ -55,7 +55,7 @@ class FakeJoinedRoom( private val roomNotificationSettingsService: FakeNotificationSettingsService = FakeNotificationSettingsService(), private var createTimelineResult: (CreateTimelineParams) -> Result = { lambdaError() }, private val editMessageLambda: (EventId, String, String?, List) -> Result = { _, _, _, _ -> lambdaError() }, - private val sendCallNotificationIfNeededResult: () -> Result = { lambdaError() }, + private val sendCallNotificationIfNeededResult: () -> Result = { lambdaError() }, private val progressCallbackValues: List> = emptyList(), private val generateWidgetWebViewUrlResult: (MatrixWidgetSettings, String, String?, String?) -> Result = { _, _, _, _ -> lambdaError() }, private val getWidgetDriverResult: (MatrixWidgetSettings) -> Result = { lambdaError() }, @@ -207,7 +207,7 @@ class FakeJoinedRoom( return getWidgetDriverResult(widgetSettings) } - override suspend fun sendCallNotificationIfNeeded(): Result = simulateLongTask { + override suspend fun sendCallNotificationIfNeeded(): Result = simulateLongTask { sendCallNotificationIfNeededResult() }