From 5491040ac5054a22cc5b1831cb34647b9970b0be Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 12 Jan 2026 10:48:20 +0100 Subject: [PATCH 01/17] WIP: Support using Element Call for voice calls in DMs --- .../android/features/call/api/CallType.kt | 3 +- .../RingingCallNotificationCreator.kt | 3 +- .../receivers/DeclineCallBroadcastReceiver.kt | 5 ++- .../call/impl/ui/CallScreenPresenter.kt | 1 + .../call/impl/ui/IncomingCallActivity.kt | 9 +++- .../call/impl/utils/ActiveCallManager.kt | 2 + .../call/impl/utils/CallWidgetProvider.kt | 1 + .../impl/utils/DefaultCallWidgetProvider.kt | 2 + .../messages/impl/MessagesFlowNode.kt | 6 ++- .../features/messages/impl/MessagesNode.kt | 6 ++- .../features/messages/impl/MessagesView.kt | 4 +- .../impl/threads/ThreadedMessagesNode.kt | 6 ++- .../messages/impl/timeline/TimelineView.kt | 2 +- .../impl/timeline/components/CallMenuItem.kt | 43 +++++++++++++------ .../components/TimelineItemCallNotifyView.kt | 2 +- .../timeline/components/TimelineItemRow.kt | 2 +- .../impl/topbars/MessagesViewTopBar.kt | 2 +- .../features/roomcall/api/RoomCallState.kt | 2 + .../roomcall/api/RoomCallStateProvider.kt | 3 ++ .../roomcall/impl/RoomCallStatePresenter.kt | 1 + .../roomdetails/impl/RoomDetailsFlowNode.kt | 11 ++++- .../userprofile/impl/UserProfileFlowNode.kt | 3 +- .../api/widget/CallWidgetSettingsProvider.kt | 1 + .../DefaultCallWidgetSettingsProvider.kt | 25 ++++++++--- .../widget/FakeCallWidgetSettingsProvider.kt | 12 +++++- .../push/impl/push/DefaultPushHandler.kt | 7 ++- 26 files changed, 122 insertions(+), 42 deletions(-) diff --git a/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt b/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt index 5beb9f7c54..4f25bd654a 100644 --- a/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt +++ b/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt @@ -26,9 +26,10 @@ sealed interface CallType : NodeInputs, Parcelable { data class RoomCall( val sessionId: SessionId, val roomId: RoomId, + val voiceIntent: Boolean ) : CallType { override fun toString(): String { - return "RoomCall(sessionId=$sessionId, roomId=$roomId)" + return "RoomCall(sessionId=$sessionId, roomId=$roomId, voiceIntent=$voiceIntent)" } } } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt index e7d270ef8e..89ca335344 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt @@ -88,7 +88,8 @@ class RingingCallNotificationCreator( .setImportant(true) .build() - val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId)) + // TODO + val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, voiceIntent = false)) val notificationData = CallNotificationData( sessionId = sessionId, roomId = roomId, diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt index b9775892c3..56f2f34da5 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt @@ -45,8 +45,9 @@ class DeclineCallBroadcastReceiver : BroadcastReceiver() { callType = CallType.RoomCall( sessionId = notificationData.sessionId, roomId = notificationData.roomId, - ), - notificationData = notificationData, + // TODO + voiceIntent = false + ) ) } } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt index ba670e03aa..33eee90574 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt @@ -226,6 +226,7 @@ class CallScreenPresenter( sessionId = inputs.sessionId, roomId = inputs.roomId, clientId = UUID.randomUUID().toString(), + voiceOnly = inputs.voiceIntent, languageTag = languageTag, theme = theme, ).getOrThrow() diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt index faedd2648c..5dea00a337 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt @@ -112,7 +112,14 @@ class IncomingCallActivity : AppCompatActivity() { } private fun onAnswer(notificationData: CallNotificationData) { - elementCallEntryPoint.startCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId)) + elementCallEntryPoint.startCall( + CallType.RoomCall( + notificationData.sessionId, + notificationData.roomId, + // TODO + voiceIntent = false + ) + ) } private fun onCancel() { diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt index a6663943bd..40f66db623 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt @@ -146,6 +146,8 @@ class DefaultActiveCallManager( callType = CallType.RoomCall( sessionId = notificationData.sessionId, roomId = notificationData.roomId, + // TODO + voiceIntent = false, ), callState = CallState.Ringing(notificationData), ) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt index 6ce73bc5e6..d4fae4826e 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt @@ -16,6 +16,7 @@ interface CallWidgetProvider { suspend fun getWidget( sessionId: SessionId, roomId: RoomId, + voiceOnly: Boolean, clientId: String, languageTag: String?, theme: String?, diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt index 1728a0cace..f94a1ecd59 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt @@ -32,6 +32,7 @@ class DefaultCallWidgetProvider( override suspend fun getWidget( sessionId: SessionId, roomId: RoomId, + voiceOnly: Boolean, clientId: String, languageTag: String?, theme: String?, @@ -50,6 +51,7 @@ class DefaultCallWidgetProvider( baseUrl = baseUrl, encrypted = isEncrypted, direct = room.isDm(), + voiceOnly = voiceOnly, hasActiveCall = roomInfo.hasRoomCall, ) val callUrl = room.generateWidgetWebViewUrl( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index f0b88e1956..4ba68c81f7 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -272,10 +272,11 @@ class MessagesFlowNode( backstack.push(NavTarget.EditPoll(Timeline.Mode.Live, eventId)) } - override fun navigateToRoomCall(roomId: RoomId) { + override fun navigateToRoomCall(roomId: RoomId, voiceIntent: Boolean) { val callType = CallType.RoomCall( sessionId = sessionId, roomId = roomId, + voiceIntent = voiceIntent ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(callType) @@ -488,10 +489,11 @@ class MessagesFlowNode( backstack.push(NavTarget.EditPoll(Timeline.Mode.Thread(navTarget.threadRootId), eventId)) } - override fun navigateToRoomCall(roomId: RoomId) { + override fun navigateToRoomCall(roomId: RoomId, voiceOnly: Boolean) { val callType = CallType.RoomCall( sessionId = sessionId, roomId = roomId, + voiceIntent = voiceOnly ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(callType) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index e892f80c7d..83dc7aebe4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -125,7 +125,7 @@ class MessagesNode( fun navigateToSendLocation() fun navigateToCreatePoll() fun navigateToEditPoll(eventId: EventId) - fun navigateToRoomCall(roomId: RoomId) + fun navigateToRoomCall(roomId: RoomId, voiceIntent: Boolean) fun navigateToThread(threadRootId: ThreadId, focusedEventId: EventId?) fun navigateToRoomDetails() fun navigateToPinnedMessagesList() @@ -279,7 +279,9 @@ class MessagesNode( }, onSendLocationClick = callback::navigateToSendLocation, onCreatePollClick = callback::navigateToCreatePoll, - onJoinCallClick = { callback.navigateToRoomCall(room.roomId) }, + onJoinCallClick = { voiceOnly -> + callback.navigateToRoomCall(room.roomId, voiceOnly) + }, onViewAllPinnedMessagesClick = callback::navigateToPinnedMessagesList, modifier = modifier, knockRequestsBannerView = { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt index 559392583f..082e31b51b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt @@ -130,7 +130,7 @@ fun MessagesView( onLinkClick: (String, Boolean) -> Unit, onSendLocationClick: () -> Unit, onCreatePollClick: () -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceIntent: Boolean) -> Unit, onViewAllPinnedMessagesClick: () -> Unit, modifier: Modifier = Modifier, forceJumpToBottomVisibility: Boolean = false, @@ -423,7 +423,7 @@ private fun MessagesViewContent( onMessageLongClick: (TimelineItem.Event) -> Unit, onSendLocationClick: () -> Unit, onCreatePollClick: () -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceIntent: Boolean) -> Unit, onViewAllPinnedMessagesClick: () -> Unit, forceJumpToBottomVisibility: Boolean, onSwipeToReply: (TimelineItem.Event) -> Unit, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt index 46145ba6b9..9ef97e6ffa 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt @@ -130,7 +130,7 @@ class ThreadedMessagesNode( fun navigateToSendLocation() fun navigateToCreatePoll() fun navigateToEditPoll(eventId: EventId) - fun navigateToRoomCall(roomId: RoomId) + fun navigateToRoomCall(roomId: RoomId, voiceOnly: Boolean) fun navigateToThread(threadRootId: ThreadId, focusedEventId: EventId?) } @@ -281,7 +281,9 @@ class ThreadedMessagesNode( }, onSendLocationClick = callback::navigateToSendLocation, onCreatePollClick = callback::navigateToCreatePoll, - onJoinCallClick = { callback.navigateToRoomCall(room.roomId) }, + onJoinCallClick = { voiceIntent -> + callback.navigateToRoomCall(room.roomId, voiceIntent) + }, onViewAllPinnedMessagesClick = {}, modifier = modifier, knockRequestsBannerView = {}, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index e44a6e170c..08d29e2ba6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -100,7 +100,7 @@ fun TimelineView( onReactionLongClick: (emoji: String, TimelineItem.Event) -> Unit, onMoreReactionsClick: (TimelineItem.Event) -> Unit, onReadReceiptClick: (TimelineItem.Event) -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceIntent: Boolean) -> Unit, modifier: Modifier = Modifier, lazyListState: LazyListState = rememberLazyListState(), forceJumpToBottomVisibility: Boolean = false, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index 73e6c1873a..989cbff1e6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -10,6 +10,7 @@ package io.element.android.features.messages.impl.timeline.components import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.size @@ -35,7 +36,7 @@ import io.element.android.libraries.ui.strings.CommonStrings @Composable internal fun CallMenuItem( roomCallState: RoomCallState, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceOnly: Boolean) -> Unit, modifier: Modifier = Modifier, ) { when (roomCallState) { @@ -52,7 +53,7 @@ internal fun CallMenuItem( is RoomCallState.OnGoing -> { OnGoingCallMenuItem( roomCallState = roomCallState, - onJoinCallClick = onJoinCallClick, + onJoinCallClick = { onJoinCallClick(roomCallState.isVoiceIntent) }, modifier = modifier, ) } @@ -62,18 +63,30 @@ internal fun CallMenuItem( @Composable private fun StandByCallMenuItem( roomCallState: RoomCallState.StandBy, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceOnly: Boolean) -> Unit, modifier: Modifier = Modifier, ) { - IconButton( - modifier = modifier, - onClick = onJoinCallClick, - enabled = roomCallState.canStartCall, - ) { - Icon( - imageVector = CompoundIcons.VideoCallSolid(), - contentDescription = stringResource(CommonStrings.a11y_start_call), - ) + Row(modifier = modifier) { + IconButton( + modifier = modifier, + onClick = { onJoinCallClick(true) }, + enabled = roomCallState.canStartCall, + ) { + Icon( + imageVector = CompoundIcons.VoiceCallSolid(), + contentDescription = stringResource(CommonStrings.a11y_start_call), + ) + } + IconButton( + modifier = modifier, + onClick = { onJoinCallClick(false) }, + enabled = roomCallState.canStartCall, + ) { + Icon( + imageVector = CompoundIcons.VideoCallSolid(), + contentDescription = stringResource(CommonStrings.a11y_start_call), + ) + } } } @@ -96,7 +109,11 @@ private fun OnGoingCallMenuItem( ) { Icon( modifier = Modifier.size(20.dp), - imageVector = CompoundIcons.VideoCallSolid(), + imageVector = if (roomCallState.isVoiceIntent) { + CompoundIcons.VoiceCallSolid() + } else { + CompoundIcons.VideoCallSolid() + }, contentDescription = null ) Spacer(Modifier.width(8.dp)) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt index c921135b96..203b4949b0 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt @@ -46,7 +46,7 @@ internal fun TimelineItemCallNotifyView( event: TimelineItem.Event, roomCallState: RoomCallState, onLongClick: (TimelineItem.Event) -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceOnly: Boolean) -> Unit, modifier: Modifier = Modifier ) { Row( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt index 15e47e5269..f55c1303eb 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt @@ -72,7 +72,7 @@ internal fun TimelineItemRow( onMoreReactionsClick: (TimelineItem.Event) -> Unit, onReadReceiptClick: (TimelineItem.Event) -> Unit, onSwipeToReply: (TimelineItem.Event) -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceIntent: Boolean) -> Unit, eventSink: (TimelineEvent.TimelineItemEvent) -> Unit, modifier: Modifier = Modifier, eventContentView: @Composable (TimelineItem.Event, Modifier, (ContentAvoidingLayoutData) -> Unit) -> Unit = diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt index 5d3746f82e..a7faa0f20f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt @@ -66,7 +66,7 @@ internal fun MessagesViewTopBar( dmUserIdentityState: IdentityState?, sharedHistoryIcon: SharedHistoryIcon, onRoomDetailsClick: () -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (voiceIntent: Boolean) -> Unit, onBackClick: () -> Unit, modifier: Modifier = Modifier, ) { diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt index 1a6b17ec89..a6650c0c32 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt @@ -18,10 +18,12 @@ sealed interface RoomCallState { data class StandBy( val canStartCall: Boolean, + // TODO: add is DM to know if should show the voice call option? ) : RoomCallState data class OnGoing( val canJoinCall: Boolean, + val isVoiceIntent: Boolean, val isUserInTheCall: Boolean, val isUserLocallyInTheCall: Boolean, ) : RoomCallState diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt index be86c2441d..d0a759f600 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt @@ -17,6 +17,7 @@ open class RoomCallStateProvider : PreviewParameterProvider { anOngoingCallState(), anOngoingCallState(canJoinCall = false), anOngoingCallState(canJoinCall = true, isUserInTheCall = true), + anOngoingCallState(canJoinCall = true, isVoiceIntent = true), RoomCallState.Unavailable, ) } @@ -25,10 +26,12 @@ fun anOngoingCallState( canJoinCall: Boolean = true, isUserInTheCall: Boolean = false, isUserLocallyInTheCall: Boolean = isUserInTheCall, + isVoiceIntent: Boolean = false, ) = RoomCallState.OnGoing( canJoinCall = canJoinCall, isUserInTheCall = isUserInTheCall, isUserLocallyInTheCall = isUserLocallyInTheCall, + isVoiceIntent = isVoiceIntent ) fun aStandByCallState( diff --git a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt index b18a2772a3..c431570be8 100644 --- a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt +++ b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt @@ -56,6 +56,7 @@ class RoomCallStatePresenter( canJoinCall = canJoinCall, isUserInTheCall = isUserInTheCall, isUserLocallyInTheCall = isUserLocallyInTheCall, + isVoiceIntent = false // TODO ) else -> RoomCallState.StandBy(canStartCall = canJoinCall) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt index 03adbded1b..c157618a59 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt @@ -227,6 +227,8 @@ class RoomDetailsFlowNode( val inputs = CallType.RoomCall( sessionId = room.sessionId, roomId = room.roomId, + // TODO + voiceIntent = false ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(inputs) @@ -285,7 +287,14 @@ class RoomDetailsFlowNode( } override fun startCall(dmRoomId: RoomId) { - elementCallEntryPoint.startCall(CallType.RoomCall(roomId = dmRoomId, sessionId = room.sessionId)) + elementCallEntryPoint.startCall( + CallType.RoomCall( + roomId = dmRoomId, + sessionId = room.sessionId, + // TODO + voiceIntent = false + ) + ) } override fun startVerifyUserFlow(userId: UserId) { diff --git a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt index f95ccce528..b981b68eb8 100644 --- a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt +++ b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt @@ -84,7 +84,8 @@ class UserProfileFlowNode( } override fun startCall(dmRoomId: RoomId) { - elementCallEntryPoint.startCall(CallType.RoomCall(sessionId = sessionId, roomId = dmRoomId)) + // TODO + elementCallEntryPoint.startCall(CallType.RoomCall(sessionId = sessionId, roomId = dmRoomId, voiceIntent = false)) } override fun startVerifyUserFlow(userId: UserId) { diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt index 6c91a90928..dd4fa3eb66 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt @@ -16,6 +16,7 @@ interface CallWidgetSettingsProvider { widgetId: String = UUID.randomUUID().toString(), encrypted: Boolean, direct: Boolean, + voiceOnly: Boolean, hasActiveCall: Boolean, ): MatrixWidgetSettings } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt index 60a0bead33..7cf11d97e0 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt @@ -30,7 +30,14 @@ class DefaultCallWidgetSettingsProvider( private val callAnalyticsCredentialsProvider: CallAnalyticCredentialsProvider, private val analyticsService: AnalyticsService, ) : CallWidgetSettingsProvider { - override suspend fun provide(baseUrl: String, widgetId: String, encrypted: Boolean, direct: Boolean, hasActiveCall: Boolean): MatrixWidgetSettings { + override suspend fun provide( + baseUrl: String, + widgetId: String, + encrypted: Boolean, + direct: Boolean, + voiceOnly: Boolean, + hasActiveCall: Boolean + ): MatrixWidgetSettings { val isAnalyticsEnabled = analyticsService.userConsentFlow.first() val properties = VirtualElementCallWidgetProperties( elementCallUrl = baseUrl, @@ -47,14 +54,18 @@ class DefaultCallWidgetSettingsProvider( parentUrl = null, ) val config = VirtualElementCallWidgetConfig( - // TODO remove this once we have the next EC version - preload = false, - // TODO remove this once we have the next EC version - skipLobby = null, +// // TODO remove this once we have the next EC version +// preload = false, +// // TODO remove this once we have the next EC version +// skipLobby = null, intent = when { - direct && hasActiveCall -> CallIntent.JOIN_EXISTING_DM + direct && hasActiveCall -> { + if (voiceOnly) CallIntent.JOIN_EXISTING_DM_VOICE else CallIntent.JOIN_EXISTING_DM + } hasActiveCall -> CallIntent.JOIN_EXISTING - direct -> CallIntent.START_CALL_DM + direct -> { + if (voiceOnly) CallIntent.START_CALL_DM_VOICE else CallIntent.START_CALL_DM + } else -> CallIntent.START_CALL }.also { Timber.d("Starting/joining call with intent: $it") diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt index a91868c4b6..e038415eb3 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt @@ -12,7 +12,14 @@ import io.element.android.libraries.matrix.api.widget.CallWidgetSettingsProvider import io.element.android.libraries.matrix.api.widget.MatrixWidgetSettings class FakeCallWidgetSettingsProvider( - private val provideFn: (String, String, Boolean, Boolean, Boolean) -> MatrixWidgetSettings = { _, _, _, _, _ -> MatrixWidgetSettings("id", true, "url") } + private val provideFn: ( + String, + String, + Boolean, + Boolean, + Boolean, + Boolean + ) -> MatrixWidgetSettings = { _, _, _, _, _, _ -> MatrixWidgetSettings("id", true, "url") } ) : CallWidgetSettingsProvider { val providedBaseUrls = mutableListOf() @@ -21,9 +28,10 @@ class FakeCallWidgetSettingsProvider( widgetId: String, encrypted: Boolean, direct: Boolean, + voiceOnly: Boolean, hasActiveCall: Boolean ): MatrixWidgetSettings { providedBaseUrls += baseUrl - return provideFn(baseUrl, widgetId, encrypted, direct, hasActiveCall) + return provideFn(baseUrl, widgetId, encrypted, direct, voiceOnly, hasActiveCall) } } diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt index 0053a18838..ee50e4cad1 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt @@ -300,7 +300,12 @@ class DefaultPushHandler( private suspend fun handleRingingCallEvent(notifiableEvent: NotifiableRingingCallEvent) { Timber.i("## handleInternal() : Incoming call.") elementCallEntryPoint.handleIncomingCall( - callType = CallType.RoomCall(notifiableEvent.sessionId, notifiableEvent.roomId), + callType = CallType.RoomCall( + notifiableEvent.sessionId, + notifiableEvent.roomId, + // TODO + voiceIntent = false + ), eventId = notifiableEvent.eventId, senderId = notifiableEvent.senderId, roomName = notifiableEvent.roomName, From 7ef43abd573bf9ba72d98ebe0ec7f99c5483afc3 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 08:56:33 +0100 Subject: [PATCH 02/17] Support incoming audio only calls --- .../call/impl/DefaultElementCallEntryPoint.kt | 1 + .../notifications/CallNotificationData.kt | 1 + .../RingingCallNotificationCreator.kt | 11 +++-- .../receivers/DeclineCallBroadcastReceiver.kt | 3 +- .../call/impl/ui/IncomingCallActivity.kt | 3 +- .../call/impl/ui/IncomingCallScreen.kt | 25 +++------- .../impl/ui/IncomingCallScreenProvider.kt | 46 +++++++++++++++++++ .../call/impl/utils/ActiveCallManager.kt | 3 +- .../roomdetails/impl/RoomDetailsFlowNode.kt | 11 ++--- .../roomdetails/impl/RoomDetailsNode.kt | 3 +- .../roomdetails/impl/RoomDetailsView.kt | 13 ++++-- .../members/details/RoomMemberDetailsNode.kt | 5 +- .../shared/UserProfileMainActionsSection.kt | 29 ++++++++++-- .../shared/UserProfileNodeHelper.kt | 3 +- .../userprofile/shared/UserProfileView.kt | 7 +-- .../api/notification/NotificationData.kt | 6 +++ ...imelineEventToNotificationContentMapper.kt | 8 ++++ .../impl/oidc/AccountManagementAction.kt | 6 +-- .../CallNotificationEventResolver.kt | 18 +++++++- .../model/NotifiableRingingCallEvent.kt | 2 + .../push/impl/push/DefaultPushHandler.kt | 4 +- .../impl/src/main/res/values/localazy.xml | 1 + 22 files changed, 156 insertions(+), 53 deletions(-) create mode 100644 features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt index 9ed479f5b8..bd78f7cc6a 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt @@ -58,6 +58,7 @@ class DefaultElementCallEntryPoint( expirationTimestamp = expirationTimestamp, notificationChannelId = notificationChannelId, textContent = textContent, + audioOnly = callType.voiceIntent ) activeCallManager.registerIncomingCall(notificationData = incomingCallNotificationData) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/CallNotificationData.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/CallNotificationData.kt index dcc434e84d..9206de0de8 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/CallNotificationData.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/CallNotificationData.kt @@ -29,4 +29,5 @@ data class CallNotificationData( val textContent: String?, // Expiration timestamp in millis since epoch val expirationTimestamp: Long, + val audioOnly: Boolean, ) : Parcelable diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt index 89ca335344..15af1a2c5e 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt @@ -69,6 +69,7 @@ class RingingCallNotificationCreator( timestamp: Long, expirationTimestamp: Long, textContent: String?, + audioOnly: Boolean, ): Notification? { val matrixClient = matrixClientProvider.getOrRestore(sessionId).getOrNull() ?: return null val imageLoader = imageLoaderHolder.get(matrixClient) @@ -88,8 +89,7 @@ class RingingCallNotificationCreator( .setImportant(true) .build() - // TODO - val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, voiceIntent = false)) + val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, voiceIntent = audioOnly)) val notificationData = CallNotificationData( sessionId = sessionId, roomId = roomId, @@ -102,6 +102,7 @@ class RingingCallNotificationCreator( timestamp = timestamp, textContent = textContent, expirationTimestamp = expirationTimestamp, + audioOnly = audioOnly, ) val declineIntent = PendingIntentCompat.getBroadcast( @@ -128,7 +129,11 @@ class RingingCallNotificationCreator( .setSmallIcon(CommonDrawables.ic_notification) .setPriority(NotificationCompat.PRIORITY_MAX) .setCategory(NotificationCompat.CATEGORY_CALL) - .setStyle(NotificationCompat.CallStyle.forIncomingCall(caller, declineIntent, answerIntent).setIsVideo(true)) + .setStyle( + NotificationCompat.CallStyle + .forIncomingCall(caller, declineIntent, answerIntent) + .setIsVideo(!audioOnly) + ) .addPerson(caller) .setAutoCancel(true) .setWhen(timestamp) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt index 56f2f34da5..54fb41d864 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt @@ -45,8 +45,7 @@ class DeclineCallBroadcastReceiver : BroadcastReceiver() { callType = CallType.RoomCall( sessionId = notificationData.sessionId, roomId = notificationData.roomId, - // TODO - voiceIntent = false + voiceIntent = notificationData.audioOnly ) ) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt index 5dea00a337..d6c85c66c5 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt @@ -116,8 +116,7 @@ class IncomingCallActivity : AppCompatActivity() { CallType.RoomCall( notificationData.sessionId, notificationData.roomId, - // TODO - voiceIntent = false + voiceIntent = notificationData.audioOnly ) ) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt index 5ec3689b44..1ce2acee08 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt @@ -30,6 +30,7 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme @@ -45,10 +46,6 @@ import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.libraries.matrix.api.core.EventId -import io.element.android.libraries.matrix.api.core.RoomId -import io.element.android.libraries.matrix.api.core.SessionId -import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.ui.strings.CommonStrings /** @@ -103,7 +100,7 @@ internal fun IncomingCallScreen( ActionButton( size = 64.dp, onClick = { onAnswer(notificationData) }, - icon = CompoundIcons.VoiceCallSolid(), + icon = if (notificationData.audioOnly) CompoundIcons.VoiceCallSolid() else CompoundIcons.VideoCallSolid(), title = stringResource(CommonStrings.action_accept), backgroundColor = ElementTheme.colors.iconSuccessPrimary, borderColor = ElementTheme.colors.borderSuccessSubtle @@ -163,21 +160,11 @@ private fun ActionButton( @PreviewsDayNight @Composable -internal fun IncomingCallScreenPreview() = ElementPreview { +internal fun IncomingCallScreenPreview( + @PreviewParameter(IncomingCallScreenProvider::class) state: CallNotificationData, +) = ElementPreview { IncomingCallScreen( - notificationData = CallNotificationData( - sessionId = SessionId("@alice:matrix.org"), - roomId = RoomId("!1234:matrix.org"), - eventId = EventId("\$asdadadsad:matrix.org"), - senderId = UserId("@bob:matrix.org"), - roomName = "A room", - senderName = "Bob", - avatarUrl = null, - notificationChannelId = "incoming_call", - timestamp = 0L, - textContent = null, - expirationTimestamp = 1000L, - ), + notificationData = state, onAnswer = {}, onCancel = {}, ) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt new file mode 100644 index 0000000000..287a57db1a --- /dev/null +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2026 Element Creations Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial. + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.features.call.impl.ui + +import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import io.element.android.features.call.impl.notifications.CallNotificationData +import io.element.android.libraries.matrix.api.core.EventId +import io.element.android.libraries.matrix.api.core.RoomId +import io.element.android.libraries.matrix.api.core.SessionId +import io.element.android.libraries.matrix.api.core.UserId + +open class IncomingCallScreenProvider : PreviewParameterProvider { + override val values: Sequence + get() = sequenceOf( + aIncomingCallScreenState( + audioOnly = false + ), + aIncomingCallScreenState( + audioOnly = true + ), + ) +} + +internal fun aIncomingCallScreenState( + audioOnly: Boolean +): CallNotificationData { + return CallNotificationData( + sessionId = SessionId("@alice:matrix.org"), + roomId = RoomId("!1234:matrix.org"), + eventId = EventId("\$asdadadsad:matrix.org"), + senderId = UserId("@bob:matrix.org"), + roomName = "A room", + senderName = "Bob", + avatarUrl = null, + notificationChannelId = "incoming_call", + timestamp = 0L, + textContent = null, + expirationTimestamp = 1000L, + audioOnly = audioOnly + ) +} diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt index 40f66db623..5899214773 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt @@ -147,7 +147,7 @@ class DefaultActiveCallManager( sessionId = notificationData.sessionId, roomId = notificationData.roomId, // TODO - voiceIntent = false, + voiceIntent = notificationData.audioOnly, ), callState = CallState.Ringing(notificationData), ) @@ -275,6 +275,7 @@ class DefaultActiveCallManager( timestamp = notificationData.timestamp, textContent = notificationData.textContent, expirationTimestamp = notificationData.expirationTimestamp, + audioOnly = notificationData.audioOnly, ) ?: return runCatchingExceptions { notificationManagerCompat.notify( diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt index c157618a59..047733687f 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt @@ -55,6 +55,7 @@ import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.permalink.PermalinkData import io.element.android.libraries.matrix.api.room.JoinedRoom import io.element.android.libraries.matrix.api.verification.VerificationRequest @@ -223,12 +224,11 @@ class RoomDetailsFlowNode( backstack.push(NavTarget.RoomMemberDetails(userId)) } - override fun navigateToRoomCall() { + override fun navigateToRoomCall(callIntent: CallIntent) { val inputs = CallType.RoomCall( sessionId = room.sessionId, roomId = room.roomId, - // TODO - voiceIntent = false + voiceIntent = callIntent == CallIntent.AUDIO ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(inputs) @@ -286,13 +286,12 @@ class RoomDetailsFlowNode( callback.navigateToRoom(roomId, emptyList()) } - override fun startCall(dmRoomId: RoomId) { + override fun startCall(dmRoomId: RoomId, callIntent: CallIntent) { elementCallEntryPoint.startCall( CallType.RoomCall( roomId = dmRoomId, sessionId = room.sessionId, - // TODO - voiceIntent = false + voiceIntent = callIntent == CallIntent.AUDIO ) ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsNode.kt index d7b4e0d813..e9aad5b1d2 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsNode.kt @@ -29,6 +29,7 @@ import io.element.android.libraries.architecture.appyx.launchMolecule import io.element.android.libraries.architecture.callback import io.element.android.libraries.di.RoomScope import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.room.BaseRoom import io.element.android.services.analytics.api.AnalyticsService import kotlinx.coroutines.CoroutineScope @@ -59,7 +60,7 @@ class RoomDetailsNode( fun navigateToKnockRequestsList() fun navigateToSecurityAndPrivacy() fun navigateToRoomMemberDetails(userId: UserId) - fun navigateToRoomCall() + fun navigateToRoomCall(callIntent: CallIntent) fun navigateToReportRoom() fun navigateToSelectNewOwnersWhenLeaving() } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt index 3ec9b0a1da..9adb51bd6b 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt @@ -79,6 +79,7 @@ import io.element.android.libraries.designsystem.utils.snackbar.rememberSnackbar import io.element.android.libraries.matrix.api.core.RoomAlias import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.room.RoomMember import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.getBestName @@ -105,7 +106,7 @@ fun RoomDetailsView( openPollHistory: () -> Unit, openMediaGallery: () -> Unit, openAdminSettings: () -> Unit, - onJoinCallClick: () -> Unit, + onJoinCallClick: (CallIntent) -> Unit, onPinnedMessagesClick: () -> Unit, onKnockRequestsClick: () -> Unit, onSecurityAndPrivacyClick: () -> Unit, @@ -327,7 +328,7 @@ private fun MainActionsSection( state: RoomDetailsState, onShareRoom: () -> Unit, onInvitePeople: () -> Unit, - onCall: () -> Unit, + onCall: (callIntent: CallIntent) -> Unit, ) { Row( modifier = Modifier @@ -358,8 +359,14 @@ private fun MainActionsSection( // TODO Improve the view depending on all the cases here? MainActionButton( title = stringResource(CommonStrings.action_call), + imageVector = CompoundIcons.VoiceCall(), + onClick = { onCall(CallIntent.AUDIO) }, + ) + + MainActionButton( + title = stringResource(CommonStrings.common_video), imageVector = CompoundIcons.VideoCall(), - onClick = onCall, + onClick = { onCall(CallIntent.VIDEO) }, ) } if (state.roomType is RoomDetailsType.Room) { diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt index ce798e5da9..ccf2f28ab5 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt @@ -26,6 +26,7 @@ import io.element.android.libraries.architecture.inputs import io.element.android.libraries.di.RoomScope import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.permalink.PermalinkBuilder import io.element.android.services.analytics.api.AnalyticsService @@ -67,8 +68,8 @@ class RoomMemberDetailsNode( callback.navigateToRoom(roomId) } - fun onStartCall(roomId: RoomId) { - callback.startCall(roomId) + fun onStartCall(roomId: RoomId, callIntent: CallIntent) { + callback.startCall(roomId, callIntent) } val state = presenter.present() diff --git a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileMainActionsSection.kt b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileMainActionsSection.kt index 0ed6d14aca..05938820b5 100644 --- a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileMainActionsSection.kt +++ b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileMainActionsSection.kt @@ -18,6 +18,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.libraries.designsystem.components.button.MainActionButton +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -26,11 +29,13 @@ fun UserProfileMainActionsSection( canCall: Boolean, onShareUser: () -> Unit, onStartDM: () -> Unit, - onCall: () -> Unit, + onCall: (CallIntent) -> Unit, modifier: Modifier = Modifier ) { Row( - modifier.fillMaxWidth().padding(horizontal = 16.dp), + modifier + .fillMaxWidth() + .padding(horizontal = 16.dp), horizontalArrangement = Arrangement.SpaceEvenly, ) { if (!isCurrentUser) { @@ -43,8 +48,14 @@ fun UserProfileMainActionsSection( if (canCall) { MainActionButton( title = stringResource(CommonStrings.action_call), + imageVector = CompoundIcons.VoiceCall(), + onClick = { onCall(CallIntent.AUDIO) }, + ) + + MainActionButton( + title = stringResource(CommonStrings.common_video), imageVector = CompoundIcons.VideoCall(), - onClick = onCall, + onClick = { onCall(CallIntent.VIDEO) }, ) } MainActionButton( @@ -54,3 +65,15 @@ fun UserProfileMainActionsSection( ) } } + +@PreviewsDayNight() +@Composable +internal fun UserProfileMainActionsSectionPreview() = ElementPreview { + UserProfileMainActionsSection( + isCurrentUser = false, + canCall = true, + onShareUser = { }, + onStartDM = { }, + onCall = { } + ) +} diff --git a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileNodeHelper.kt b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileNodeHelper.kt index 6f2266eef2..6699183f69 100644 --- a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileNodeHelper.kt +++ b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileNodeHelper.kt @@ -14,6 +14,7 @@ import io.element.android.libraries.androidutils.system.startSharePlainTextInten import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.permalink.PermalinkBuilder import io.element.android.libraries.ui.strings.CommonStrings import timber.log.Timber @@ -24,7 +25,7 @@ class UserProfileNodeHelper( interface Callback : NodeInputs { fun navigateToAvatarPreview(username: String, avatarUrl: String) fun navigateToRoom(roomId: RoomId) - fun startCall(dmRoomId: RoomId) + fun startCall(dmRoomId: RoomId, callIntent: CallIntent) fun startVerifyUserFlow(userId: UserId) } diff --git a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileView.kt b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileView.kt index 48f89390da..380bb006ab 100644 --- a/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileView.kt +++ b/features/userprofile/shared/src/main/kotlin/io/element/android/features/userprofile/shared/UserProfileView.kt @@ -43,6 +43,7 @@ import io.element.android.libraries.designsystem.utils.snackbar.SnackbarHost import io.element.android.libraries.designsystem.utils.snackbar.rememberSnackbarHostState import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.ui.components.CreateDmConfirmationBottomSheet import io.element.android.libraries.ui.strings.CommonStrings @@ -52,7 +53,7 @@ fun UserProfileView( state: UserProfileState, onShareUser: () -> Unit, onOpenDm: (RoomId) -> Unit, - onStartCall: (RoomId) -> Unit, + onStartCall: (RoomId, CallIntent) -> Unit, goBack: () -> Unit, openAvatarPreview: (username: String, url: String) -> Unit, onVerifyClick: (UserId) -> Unit, @@ -90,7 +91,7 @@ fun UserProfileView( canCall = state.canCall, onShareUser = onShareUser, onStartDM = { state.eventSink(UserProfileEvents.StartDM) }, - onCall = { state.dmRoomId?.let { onStartCall(it) } } + onCall = { intent -> state.dmRoomId?.let { onStartCall(it, intent) } } ) Spacer(modifier = Modifier.height(26.dp)) if (!state.isCurrentUser) { @@ -151,7 +152,7 @@ internal fun UserProfileViewPreview( onShareUser = {}, goBack = {}, onOpenDm = {}, - onStartCall = {}, + onStartCall = { _, _ -> }, openAvatarPreview = { _, _ -> }, onVerifyClick = {}, ) diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notification/NotificationData.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notification/NotificationData.kt index 02e40813b0..5dce175237 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notification/NotificationData.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notification/NotificationData.kt @@ -56,6 +56,7 @@ sealed interface NotificationContent { data class RtcNotification( val senderId: UserId, val type: RtcNotificationType, + val callIntent: CallIntent, val expirationTimestampMillis: Long ) : MessageLike @@ -127,3 +128,8 @@ enum class RtcNotificationType { RING, NOTIFY } + +enum class CallIntent { + AUDIO, + VIDEO +} diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/TimelineEventToNotificationContentMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/TimelineEventToNotificationContentMapper.kt index 450216b452..96c4bdf3c4 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/TimelineEventToNotificationContentMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/TimelineEventToNotificationContentMapper.kt @@ -11,6 +11,7 @@ package io.element.android.libraries.matrix.impl.notification import io.element.android.libraries.core.extensions.runCatchingExceptions import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.NotificationContent import io.element.android.libraries.matrix.api.notification.RtcNotificationType import io.element.android.libraries.matrix.impl.room.member.RoomMemberMapper @@ -20,6 +21,7 @@ import org.matrix.rustcomponents.sdk.StateEventContent import org.matrix.rustcomponents.sdk.TimelineEvent import org.matrix.rustcomponents.sdk.TimelineEventContent import org.matrix.rustcomponents.sdk.use +import org.matrix.rustcomponents.sdk.RtcCallIntent as SdkRtcCallIntent import org.matrix.rustcomponents.sdk.RtcNotificationType as SdkRtcNotificationType class TimelineEventToNotificationContentMapper { @@ -83,6 +85,7 @@ private fun MessageLikeEventContent.toContent(senderId: UserId): NotificationCon is MessageLikeEventContent.RtcNotification -> NotificationContent.MessageLike.RtcNotification( senderId = senderId, type = notificationType.map(), + callIntent = callIntent.map(), expirationTimestampMillis = expirationTs.toLong() ) MessageLikeEventContent.KeyVerificationAccept -> NotificationContent.MessageLike.KeyVerificationAccept @@ -111,3 +114,8 @@ private fun SdkRtcNotificationType.map(): RtcNotificationType = when (this) { SdkRtcNotificationType.NOTIFICATION -> RtcNotificationType.NOTIFY SdkRtcNotificationType.RING -> RtcNotificationType.RING } + +private fun SdkRtcCallIntent?.map(): CallIntent = when (this) { + SdkRtcCallIntent.AUDIO -> CallIntent.AUDIO + else -> CallIntent.VIDEO +} diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementAction.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementAction.kt index f998126e17..76e60e90f4 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementAction.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementAction.kt @@ -14,8 +14,8 @@ import org.matrix.rustcomponents.sdk.AccountManagementAction as RustAccountManag fun AccountManagementAction.toRustAction(): RustAccountManagementAction { return when (this) { AccountManagementAction.Profile -> RustAccountManagementAction.Profile - is AccountManagementAction.SessionEnd -> RustAccountManagementAction.SessionEnd(deviceId.value) - is AccountManagementAction.SessionView -> RustAccountManagementAction.SessionView(deviceId.value) - AccountManagementAction.SessionsList -> RustAccountManagementAction.SessionsList + is AccountManagementAction.SessionEnd -> RustAccountManagementAction.DeviceDelete(deviceId.value) + is AccountManagementAction.SessionView -> RustAccountManagementAction.DeviceView(deviceId.value) + AccountManagementAction.SessionsList -> RustAccountManagementAction.DevicesList } } diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/CallNotificationEventResolver.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/CallNotificationEventResolver.kt index 444d0c725a..d32816d634 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/CallNotificationEventResolver.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/CallNotificationEventResolver.kt @@ -14,6 +14,7 @@ import io.element.android.libraries.core.extensions.runCatchingExceptions import io.element.android.libraries.matrix.api.MatrixClientProvider import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.exception.NotificationResolverException +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.NotificationContent import io.element.android.libraries.matrix.api.notification.NotificationData import io.element.android.libraries.matrix.api.notification.RtcNotificationType @@ -90,6 +91,7 @@ class DefaultCallNotificationEventResolver( notificationData.run { if (content.type == RtcNotificationType.RING && isRoomCallActive && !forceNotify) { + Timber.d("Ringing call notification intent ${content.callIntent} in room $roomId") NotifiableRingingCallEvent( sessionId = sessionId, roomId = roomId, @@ -100,10 +102,18 @@ class DefaultCallNotificationEventResolver( timestamp = this.timestamp, isRedacted = false, isUpdated = false, - description = stringProvider.getString(R.string.notification_incoming_call), + description = if (content.callIntent == + CallIntent.AUDIO) { + stringProvider.getString(R.string.notification_incoming_audio_call) + } else { + stringProvider.getString( + R.string.notification_incoming_call + ) + }, senderDisambiguatedDisplayName = getDisambiguatedDisplayName(content.senderId), roomAvatarUrl = roomAvatarUrl, rtcNotificationType = content.type, + callIntent = content.callIntent, senderId = content.senderId, senderAvatarUrl = senderAvatarUrl, expirationTimestamp = content.expirationTimestampMillis, @@ -119,7 +129,11 @@ class DefaultCallNotificationEventResolver( noisy = true, timestamp = this.timestamp, senderDisambiguatedDisplayName = getDisambiguatedDisplayName(content.senderId), - body = stringProvider.getString(R.string.notification_incoming_call), + body = if (content.callIntent == CallIntent.VIDEO) { + stringProvider.getString(R.string.notification_incoming_call) + } else { + stringProvider.getString(R.string.notification_incoming_audio_call) + }, roomName = roomDisplayName, roomIsDm = isDm, roomAvatarPath = roomAvatarUrl, diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableRingingCallEvent.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableRingingCallEvent.kt index 35432e972d..eef39eea93 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableRingingCallEvent.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableRingingCallEvent.kt @@ -12,6 +12,7 @@ import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.RtcNotificationType data class NotifiableRingingCallEvent( @@ -29,6 +30,7 @@ data class NotifiableRingingCallEvent( val senderAvatarUrl: String?, val roomAvatarUrl: String? = null, val rtcNotificationType: RtcNotificationType, + val callIntent: CallIntent, val timestamp: Long, val expirationTimestamp: Long, ) : NotifiableEvent diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt index ee50e4cad1..8fea261d8b 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt @@ -19,6 +19,7 @@ import io.element.android.libraries.di.annotations.AppCoroutineScope import io.element.android.libraries.featureflag.api.FeatureFlagService import io.element.android.libraries.featureflag.api.FeatureFlags import io.element.android.libraries.matrix.api.exception.NotificationResolverException +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.push.api.push.NotificationEventRequest import io.element.android.libraries.push.api.push.SyncOnNotifiableEvent import io.element.android.libraries.push.impl.history.PushHistoryService @@ -303,8 +304,7 @@ class DefaultPushHandler( callType = CallType.RoomCall( notifiableEvent.sessionId, notifiableEvent.roomId, - // TODO - voiceIntent = false + voiceIntent = notifiableEvent.callIntent == CallIntent.AUDIO ), eventId = notifiableEvent.eventId, senderId = notifiableEvent.senderId, diff --git a/libraries/push/impl/src/main/res/values/localazy.xml b/libraries/push/impl/src/main/res/values/localazy.xml index 15afb93d3f..d680ffeb5a 100644 --- a/libraries/push/impl/src/main/res/values/localazy.xml +++ b/libraries/push/impl/src/main/res/values/localazy.xml @@ -19,6 +19,7 @@ "You have %d new message." "You have %d new messages." + "📞 Incoming call" "📹 Incoming call" "** Failed to send - please open room" "Join" From be370911d2f94eace42367a90d35f2286820280a Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 11:10:40 +0100 Subject: [PATCH 03/17] rename voiceIntent to isAudioCall --- .../io/element/android/features/call/api/CallType.kt | 4 ++-- .../call/impl/DefaultElementCallEntryPoint.kt | 2 +- .../notifications/RingingCallNotificationCreator.kt | 2 +- .../impl/receivers/DeclineCallBroadcastReceiver.kt | 2 +- .../features/call/impl/ui/IncomingCallActivity.kt | 2 +- .../features/call/impl/utils/ActiveCallManager.kt | 2 +- .../features/messages/impl/MessagesFlowNode.kt | 6 +++--- .../android/features/messages/impl/MessagesNode.kt | 2 +- .../android/features/messages/impl/MessagesView.kt | 4 ++-- .../messages/impl/threads/ThreadedMessagesNode.kt | 4 ++-- .../features/messages/impl/timeline/TimelineView.kt | 2 +- .../impl/timeline/components/CallMenuItem.kt | 4 ++-- .../impl/timeline/components/TimelineItemRow.kt | 2 +- .../messages/impl/topbars/MessagesViewTopBar.kt | 2 +- .../android/features/roomcall/api/RoomCallState.kt | 2 +- .../features/roomcall/api/RoomCallStateProvider.kt | 6 +++--- .../features/roomcall/impl/RoomCallStatePresenter.kt | 3 ++- .../features/roomdetails/impl/RoomDetailsFlowNode.kt | 4 ++-- .../features/userprofile/impl/UserProfileFlowNode.kt | 12 +++++++++--- .../libraries/push/impl/push/DefaultPushHandler.kt | 2 +- 20 files changed, 38 insertions(+), 31 deletions(-) diff --git a/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt b/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt index 4f25bd654a..4b09813418 100644 --- a/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt +++ b/features/call/api/src/main/kotlin/io/element/android/features/call/api/CallType.kt @@ -26,10 +26,10 @@ sealed interface CallType : NodeInputs, Parcelable { data class RoomCall( val sessionId: SessionId, val roomId: RoomId, - val voiceIntent: Boolean + val isAudioCall: Boolean ) : CallType { override fun toString(): String { - return "RoomCall(sessionId=$sessionId, roomId=$roomId, voiceIntent=$voiceIntent)" + return "RoomCall(sessionId=$sessionId, roomId=$roomId, isAudioCall=$isAudioCall)" } } } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt index bd78f7cc6a..6006e2aff4 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/DefaultElementCallEntryPoint.kt @@ -58,7 +58,7 @@ class DefaultElementCallEntryPoint( expirationTimestamp = expirationTimestamp, notificationChannelId = notificationChannelId, textContent = textContent, - audioOnly = callType.voiceIntent + audioOnly = callType.isAudioCall ) activeCallManager.registerIncomingCall(notificationData = incomingCallNotificationData) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt index 15af1a2c5e..88ec94be10 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/notifications/RingingCallNotificationCreator.kt @@ -89,7 +89,7 @@ class RingingCallNotificationCreator( .setImportant(true) .build() - val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, voiceIntent = audioOnly)) + val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, isAudioCall = audioOnly)) val notificationData = CallNotificationData( sessionId = sessionId, roomId = roomId, diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt index 54fb41d864..179e6c2b22 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/receivers/DeclineCallBroadcastReceiver.kt @@ -45,7 +45,7 @@ class DeclineCallBroadcastReceiver : BroadcastReceiver() { callType = CallType.RoomCall( sessionId = notificationData.sessionId, roomId = notificationData.roomId, - voiceIntent = notificationData.audioOnly + isAudioCall = notificationData.audioOnly ) ) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt index d6c85c66c5..73233fe453 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallActivity.kt @@ -116,7 +116,7 @@ class IncomingCallActivity : AppCompatActivity() { CallType.RoomCall( notificationData.sessionId, notificationData.roomId, - voiceIntent = notificationData.audioOnly + isAudioCall = notificationData.audioOnly ) ) } diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt index 5899214773..f0c8bcaad4 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt @@ -147,7 +147,7 @@ class DefaultActiveCallManager( sessionId = notificationData.sessionId, roomId = notificationData.roomId, // TODO - voiceIntent = notificationData.audioOnly, + isAudioCall = notificationData.audioOnly, ), callState = CallState.Ringing(notificationData), ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index 4ba68c81f7..1d832935ea 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -272,11 +272,11 @@ class MessagesFlowNode( backstack.push(NavTarget.EditPoll(Timeline.Mode.Live, eventId)) } - override fun navigateToRoomCall(roomId: RoomId, voiceIntent: Boolean) { + override fun navigateToRoomCall(roomId: RoomId, isAudioCall: Boolean) { val callType = CallType.RoomCall( sessionId = sessionId, roomId = roomId, - voiceIntent = voiceIntent + isAudioCall = isAudioCall ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(callType) @@ -493,7 +493,7 @@ class MessagesFlowNode( val callType = CallType.RoomCall( sessionId = sessionId, roomId = roomId, - voiceIntent = voiceOnly + isAudioCall = voiceOnly ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(callType) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index 83dc7aebe4..f8529bf005 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -125,7 +125,7 @@ class MessagesNode( fun navigateToSendLocation() fun navigateToCreatePoll() fun navigateToEditPoll(eventId: EventId) - fun navigateToRoomCall(roomId: RoomId, voiceIntent: Boolean) + fun navigateToRoomCall(roomId: RoomId, isAudioCall: Boolean) fun navigateToThread(threadRootId: ThreadId, focusedEventId: EventId?) fun navigateToRoomDetails() fun navigateToPinnedMessagesList() diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt index 082e31b51b..0caebea8d5 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt @@ -130,7 +130,7 @@ fun MessagesView( onLinkClick: (String, Boolean) -> Unit, onSendLocationClick: () -> Unit, onCreatePollClick: () -> Unit, - onJoinCallClick: (voiceIntent: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, onViewAllPinnedMessagesClick: () -> Unit, modifier: Modifier = Modifier, forceJumpToBottomVisibility: Boolean = false, @@ -423,7 +423,7 @@ private fun MessagesViewContent( onMessageLongClick: (TimelineItem.Event) -> Unit, onSendLocationClick: () -> Unit, onCreatePollClick: () -> Unit, - onJoinCallClick: (voiceIntent: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, onViewAllPinnedMessagesClick: () -> Unit, forceJumpToBottomVisibility: Boolean, onSwipeToReply: (TimelineItem.Event) -> Unit, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt index 9ef97e6ffa..6ab9bbc506 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt @@ -281,8 +281,8 @@ class ThreadedMessagesNode( }, onSendLocationClick = callback::navigateToSendLocation, onCreatePollClick = callback::navigateToCreatePoll, - onJoinCallClick = { voiceIntent -> - callback.navigateToRoomCall(room.roomId, voiceIntent) + onJoinCallClick = { isAudioCall -> + callback.navigateToRoomCall(room.roomId, isAudioCall) }, onViewAllPinnedMessagesClick = {}, modifier = modifier, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index 08d29e2ba6..08a7191f3f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -100,7 +100,7 @@ fun TimelineView( onReactionLongClick: (emoji: String, TimelineItem.Event) -> Unit, onMoreReactionsClick: (TimelineItem.Event) -> Unit, onReadReceiptClick: (TimelineItem.Event) -> Unit, - onJoinCallClick: (voiceIntent: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, modifier: Modifier = Modifier, lazyListState: LazyListState = rememberLazyListState(), forceJumpToBottomVisibility: Boolean = false, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index 989cbff1e6..bb3882898d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -53,7 +53,7 @@ internal fun CallMenuItem( is RoomCallState.OnGoing -> { OnGoingCallMenuItem( roomCallState = roomCallState, - onJoinCallClick = { onJoinCallClick(roomCallState.isVoiceIntent) }, + onJoinCallClick = { onJoinCallClick(roomCallState.isAudioCall) }, modifier = modifier, ) } @@ -109,7 +109,7 @@ private fun OnGoingCallMenuItem( ) { Icon( modifier = Modifier.size(20.dp), - imageVector = if (roomCallState.isVoiceIntent) { + imageVector = if (roomCallState.isAudioCall) { CompoundIcons.VoiceCallSolid() } else { CompoundIcons.VideoCallSolid() diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt index f55c1303eb..469afe494e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt @@ -72,7 +72,7 @@ internal fun TimelineItemRow( onMoreReactionsClick: (TimelineItem.Event) -> Unit, onReadReceiptClick: (TimelineItem.Event) -> Unit, onSwipeToReply: (TimelineItem.Event) -> Unit, - onJoinCallClick: (voiceIntent: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, eventSink: (TimelineEvent.TimelineItemEvent) -> Unit, modifier: Modifier = Modifier, eventContentView: @Composable (TimelineItem.Event, Modifier, (ContentAvoidingLayoutData) -> Unit) -> Unit = diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt index a7faa0f20f..24cd71ae84 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/topbars/MessagesViewTopBar.kt @@ -66,7 +66,7 @@ internal fun MessagesViewTopBar( dmUserIdentityState: IdentityState?, sharedHistoryIcon: SharedHistoryIcon, onRoomDetailsClick: () -> Unit, - onJoinCallClick: (voiceIntent: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, onBackClick: () -> Unit, modifier: Modifier = Modifier, ) { diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt index a6650c0c32..10dc601702 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt @@ -23,7 +23,7 @@ sealed interface RoomCallState { data class OnGoing( val canJoinCall: Boolean, - val isVoiceIntent: Boolean, + val isAudioCall: Boolean, val isUserInTheCall: Boolean, val isUserLocallyInTheCall: Boolean, ) : RoomCallState diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt index d0a759f600..b2a8b036cc 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt @@ -17,7 +17,7 @@ open class RoomCallStateProvider : PreviewParameterProvider { anOngoingCallState(), anOngoingCallState(canJoinCall = false), anOngoingCallState(canJoinCall = true, isUserInTheCall = true), - anOngoingCallState(canJoinCall = true, isVoiceIntent = true), + anOngoingCallState(canJoinCall = true, isAudioCall = true), RoomCallState.Unavailable, ) } @@ -26,12 +26,12 @@ fun anOngoingCallState( canJoinCall: Boolean = true, isUserInTheCall: Boolean = false, isUserLocallyInTheCall: Boolean = isUserInTheCall, - isVoiceIntent: Boolean = false, + isAudioCall: Boolean = false, ) = RoomCallState.OnGoing( canJoinCall = canJoinCall, isUserInTheCall = isUserInTheCall, isUserLocallyInTheCall = isUserLocallyInTheCall, - isVoiceIntent = isVoiceIntent + isAudioCall = isAudioCall ) fun aStandByCallState( diff --git a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt index c431570be8..6a3af45f08 100644 --- a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt +++ b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt @@ -56,7 +56,8 @@ class RoomCallStatePresenter( canJoinCall = canJoinCall, isUserInTheCall = isUserInTheCall, isUserLocallyInTheCall = isUserLocallyInTheCall, - isVoiceIntent = false // TODO + // TODO resolve intent while the call is ongoing + isAudioCall = false ) else -> RoomCallState.StandBy(canStartCall = canJoinCall) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt index 047733687f..e1024c611f 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsFlowNode.kt @@ -228,7 +228,7 @@ class RoomDetailsFlowNode( val inputs = CallType.RoomCall( sessionId = room.sessionId, roomId = room.roomId, - voiceIntent = callIntent == CallIntent.AUDIO + isAudioCall = callIntent == CallIntent.AUDIO ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(inputs) @@ -291,7 +291,7 @@ class RoomDetailsFlowNode( CallType.RoomCall( roomId = dmRoomId, sessionId = room.sessionId, - voiceIntent = callIntent == CallIntent.AUDIO + isAudioCall = callIntent == CallIntent.AUDIO ) ) } diff --git a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt index b981b68eb8..aaafbe04be 100644 --- a/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt +++ b/features/userprofile/impl/src/main/kotlin/io/element/android/features/userprofile/impl/UserProfileFlowNode.kt @@ -36,6 +36,7 @@ import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.verification.VerificationRequest import io.element.android.libraries.mediaviewer.api.MediaViewerEntryPoint import kotlinx.parcelize.Parcelize @@ -83,9 +84,14 @@ class UserProfileFlowNode( callback.navigateToRoom(roomId) } - override fun startCall(dmRoomId: RoomId) { - // TODO - elementCallEntryPoint.startCall(CallType.RoomCall(sessionId = sessionId, roomId = dmRoomId, voiceIntent = false)) + override fun startCall(dmRoomId: RoomId, callIntent: CallIntent) { + elementCallEntryPoint.startCall( + CallType.RoomCall( + sessionId = sessionId, + roomId = dmRoomId, + isAudioCall = callIntent == CallIntent.AUDIO + ) + ) } override fun startVerifyUserFlow(userId: UserId) { diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt index 8fea261d8b..a8c4c93016 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/push/DefaultPushHandler.kt @@ -304,7 +304,7 @@ class DefaultPushHandler( callType = CallType.RoomCall( notifiableEvent.sessionId, notifiableEvent.roomId, - voiceIntent = notifiableEvent.callIntent == CallIntent.AUDIO + isAudioCall = notifiableEvent.callIntent == CallIntent.AUDIO ), eventId = notifiableEvent.eventId, senderId = notifiableEvent.senderId, From 22a9e541febbdcbbf9173ff00fb90310cdc89885 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 14:05:58 +0100 Subject: [PATCH 04/17] fix missing rename of var --- .../android/features/call/impl/ui/CallScreenPresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt index 33eee90574..eed4ee7327 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt @@ -226,7 +226,7 @@ class CallScreenPresenter( sessionId = inputs.sessionId, roomId = inputs.roomId, clientId = UUID.randomUUID().toString(), - voiceOnly = inputs.voiceIntent, + voiceOnly = inputs.isAudioCall, languageTag = languageTag, theme = theme, ).getOrThrow() From fdd39fa17b018a1bd2fdd7772eadd3113f8474e9 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 15:08:24 +0100 Subject: [PATCH 05/17] on show voice call only option in DMs --- .../messages/impl/MessagesPresenter.kt | 1 + .../features/messages/impl/MessagesState.kt | 1 + .../messages/impl/MessagesStateProvider.kt | 1 + .../impl/timeline/components/CallMenuItem.kt | 21 +++++++++++-------- .../features/roomcall/api/RoomCallState.kt | 1 + .../roomcall/api/RoomCallStateProvider.kt | 3 +++ .../roomcall/impl/RoomCallStatePresenter.kt | 6 +++++- .../roomdetails/impl/RoomDetailsView.kt | 13 +++++++----- 8 files changed, 32 insertions(+), 15 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt index d9c3d17afa..2c2fda6fbb 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt @@ -271,6 +271,7 @@ class MessagesPresenter( return MessagesState( roomId = room.roomId, + isDm = roomInfo.isDm, roomName = roomInfo.name, roomAvatar = roomAvatar, heroes = heroes, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt index c18fb461e0..7b9b7b739c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt @@ -32,6 +32,7 @@ import kotlinx.collections.immutable.ImmutableList data class MessagesState( val roomId: RoomId, val roomName: String?, + val isDm: Boolean, val roomAvatar: AvatarData, val heroes: ImmutableList, val userEventPermissions: UserEventPermissions, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt index d969ae1491..0f12973158 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt @@ -126,6 +126,7 @@ fun aMessagesState( ) = MessagesState( roomId = RoomId("!id:domain"), roomName = roomName, + isDm = false, roomAvatar = roomAvatar, heroes = persistentListOf(), userEventPermissions = userEventPermissions, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index bb3882898d..3a9c07fa4d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -67,15 +67,18 @@ private fun StandByCallMenuItem( modifier: Modifier = Modifier, ) { Row(modifier = modifier) { - IconButton( - modifier = modifier, - onClick = { onJoinCallClick(true) }, - enabled = roomCallState.canStartCall, - ) { - Icon( - imageVector = CompoundIcons.VoiceCallSolid(), - contentDescription = stringResource(CommonStrings.a11y_start_call), - ) + // Only show voice call in DMs + if (roomCallState.isDM) { + IconButton( + modifier = modifier, + onClick = { onJoinCallClick(true) }, + enabled = roomCallState.canStartCall, + ) { + Icon( + imageVector = CompoundIcons.VoiceCallSolid(), + contentDescription = stringResource(CommonStrings.a11y_start_call), + ) + } } IconButton( modifier = modifier, diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt index 10dc601702..27c46f816e 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt @@ -18,6 +18,7 @@ sealed interface RoomCallState { data class StandBy( val canStartCall: Boolean, + val isDM: Boolean, // TODO: add is DM to know if should show the voice call option? ) : RoomCallState diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt index b2a8b036cc..3356fa0366 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallStateProvider.kt @@ -14,6 +14,7 @@ open class RoomCallStateProvider : PreviewParameterProvider { override val values: Sequence = sequenceOf( aStandByCallState(), aStandByCallState(canStartCall = false), + aStandByCallState(canStartCall = false, isDM = true), anOngoingCallState(), anOngoingCallState(canJoinCall = false), anOngoingCallState(canJoinCall = true, isUserInTheCall = true), @@ -36,6 +37,8 @@ fun anOngoingCallState( fun aStandByCallState( canStartCall: Boolean = true, + isDM: Boolean = false, ) = RoomCallState.StandBy( canStartCall = canStartCall, + isDM ) diff --git a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt index 6a3af45f08..54ffdf6c25 100644 --- a/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt +++ b/features/roomcall/impl/src/main/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenter.kt @@ -21,6 +21,7 @@ import io.element.android.features.enterprise.api.SessionEnterpriseService import io.element.android.features.roomcall.api.RoomCallState import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.api.room.JoinedRoom +import io.element.android.libraries.matrix.api.room.isDm import io.element.android.libraries.matrix.api.room.powerlevels.canCall import io.element.android.libraries.matrix.api.room.powerlevels.permissionsAsState @@ -59,7 +60,10 @@ class RoomCallStatePresenter( // TODO resolve intent while the call is ongoing isAudioCall = false ) - else -> RoomCallState.StandBy(canStartCall = canJoinCall) + else -> RoomCallState.StandBy( + canStartCall = canJoinCall, + isDM = roomInfo.isDm + ) } } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt index 9adb51bd6b..c48716db11 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt @@ -357,11 +357,14 @@ private fun MainActionsSection( } if (state.roomCallState.hasPermissionToJoin()) { // TODO Improve the view depending on all the cases here? - MainActionButton( - title = stringResource(CommonStrings.action_call), - imageVector = CompoundIcons.VoiceCall(), - onClick = { onCall(CallIntent.AUDIO) }, - ) + if (state.roomType is RoomDetailsType.Dm) { + // As per design, only show voice call in DM + MainActionButton( + title = stringResource(CommonStrings.action_call), + imageVector = CompoundIcons.VoiceCall(), + onClick = { onCall(CallIntent.AUDIO) }, + ) + } MainActionButton( title = stringResource(CommonStrings.common_video), From 284420dd29cb55b0b587aa1ceed2c4789319271e Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 17:35:10 +0100 Subject: [PATCH 06/17] bump rust sdk bindings to 26.03.4 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 07b852ff96..7e42af3778 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -178,7 +178,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version # https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt # All new features should not be implemented in the pull request that upgrades the version, developers should # only fix API breaks and may add some TODOs. -matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.03.1" +matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.03.4" # Others coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" } From ccc276fe22e9155a2e134b44e451d9a5779ea1b7 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 17:39:36 +0100 Subject: [PATCH 07/17] remove a done TODO comment --- .../io/element/android/features/roomcall/api/RoomCallState.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt index 27c46f816e..d0bfe6677f 100644 --- a/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt +++ b/features/roomcall/api/src/main/kotlin/io/element/android/features/roomcall/api/RoomCallState.kt @@ -19,7 +19,6 @@ sealed interface RoomCallState { data class StandBy( val canStartCall: Boolean, val isDM: Boolean, - // TODO: add is DM to know if should show the voice call option? ) : RoomCallState data class OnGoing( From 1f4601c936b0f1438a4d24a70c065a4ba83441f7 Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 17:54:41 +0100 Subject: [PATCH 08/17] konsist: fix PreviewParameterProvider naming convention --- ...ingCallScreenProvider.kt => CallNotificationDataProvider.kt} | 2 +- .../element/android/features/call/impl/ui/IncomingCallScreen.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/{IncomingCallScreenProvider.kt => CallNotificationDataProvider.kt} (94%) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt similarity index 94% rename from features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt rename to features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt index 287a57db1a..76ef1f77cd 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreenProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt @@ -14,7 +14,7 @@ import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.core.UserId -open class IncomingCallScreenProvider : PreviewParameterProvider { +open class CallNotificationDataProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aIncomingCallScreenState( diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt index 1ce2acee08..72edd59ed5 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/IncomingCallScreen.kt @@ -161,7 +161,7 @@ private fun ActionButton( @PreviewsDayNight @Composable internal fun IncomingCallScreenPreview( - @PreviewParameter(IncomingCallScreenProvider::class) state: CallNotificationData, + @PreviewParameter(CallNotificationDataProvider::class) state: CallNotificationData, ) = ElementPreview { IncomingCallScreen( notificationData = state, From f81f79f79aea0884ba16feaa37336c7ab6f0a47d Mon Sep 17 00:00:00 2001 From: Valere Date: Wed, 4 Mar 2026 19:07:53 +0100 Subject: [PATCH 09/17] fix tests --- .../call/impl/utils/ActiveCallManager.kt | 1 - .../call/DefaultElementCallEntryPointTest.kt | 4 +-- .../RingingCallNotificationCreatorTest.kt | 29 +++++++++++++++- .../call/ui/CallScreenPresenterTest.kt | 14 ++++---- .../android/features/call/ui/CallTypeTest.kt | 5 +-- .../utils/DefaultActiveCallManagerTest.kt | 33 ++++++++++++++++--- .../utils/DefaultCallWidgetProviderTest.kt | 14 ++++---- .../call/utils/FakeCallWidgetProvider.kt | 1 + .../call/test/CallNotificationData.kt | 2 ++ ...efaultCallNotificationEventResolverTest.kt | 8 +++-- .../DefaultNotifiableEventResolverTest.kt | 2 ++ .../fixtures/NotifiableEventFixture.kt | 3 ++ 12 files changed, 89 insertions(+), 27 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt index f0c8bcaad4..99679a8afb 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt @@ -146,7 +146,6 @@ class DefaultActiveCallManager( callType = CallType.RoomCall( sessionId = notificationData.sessionId, roomId = notificationData.roomId, - // TODO isAudioCall = notificationData.audioOnly, ), callState = CallState.Ringing(notificationData), diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/DefaultElementCallEntryPointTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/DefaultElementCallEntryPointTest.kt index bfc6565d11..85cec8c586 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/DefaultElementCallEntryPointTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/DefaultElementCallEntryPointTest.kt @@ -37,7 +37,7 @@ class DefaultElementCallEntryPointTest { @Test fun `startCall - starts ElementCallActivity setup with the needed extras`() = runTest { val entryPoint = createEntryPoint() - entryPoint.startCall(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID)) + entryPoint.startCall(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, isAudioCall = false)) val expectedIntent = Intent(InstrumentationRegistry.getInstrumentation().targetContext, ElementCallActivity::class.java) val intent = shadowOf(RuntimeEnvironment.getApplication()).nextStartedActivity @@ -53,7 +53,7 @@ class DefaultElementCallEntryPointTest { val entryPoint = createEntryPoint(activeCallManager = activeCallManager) entryPoint.handleIncomingCall( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, isAudioCall = false), eventId = AN_EVENT_ID, senderId = A_USER_ID_2, roomName = "roomName", diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/notifications/RingingCallNotificationCreatorTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/notifications/RingingCallNotificationCreatorTest.kt index 28e2747ba9..c055b408dd 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/notifications/RingingCallNotificationCreatorTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/notifications/RingingCallNotificationCreatorTest.kt @@ -65,7 +65,33 @@ class RingingCallNotificationCreatorTest { getUserIconLambda.assertions().isCalledOnce() } - private suspend fun RingingCallNotificationCreator.createTestNotification() = createNotification( + @Test + fun `createNotification - use the correct style for video call`() = runTest { + val notificationCreator = createRingingCallNotificationCreator( + matrixClientProvider = FakeMatrixClientProvider(getClient = { Result.success(FakeMatrixClient()) }), + ) + + val notification = notificationCreator.createTestNotification() + assertThat(notification?.category).isEqualTo("call") + + val acceptAction = notification?.actions?.get(1) + assertThat(acceptAction?.title?.toString()).isEqualTo("Video") + } + + @Test + fun `createNotification - use the correct style for audio call`() = runTest { + val notificationCreator = createRingingCallNotificationCreator( + matrixClientProvider = FakeMatrixClientProvider(getClient = { Result.success(FakeMatrixClient()) }), + ) + + val notification = notificationCreator.createTestNotification(audioOnly = true) + assertThat(notification?.category).isEqualTo("call") + + val acceptAction = notification?.actions?.get(1) + assertThat(acceptAction?.title?.toString()).isEqualTo("Answer") + } + + private suspend fun RingingCallNotificationCreator.createTestNotification(audioOnly: Boolean = false) = createNotification( sessionId = A_SESSION_ID, roomId = A_ROOM_ID, eventId = AN_EVENT_ID, @@ -77,6 +103,7 @@ class RingingCallNotificationCreatorTest { timestamp = 0L, expirationTimestamp = 20L, textContent = "textContent", + audioOnly = audioOnly ) private fun createRingingCallNotificationCreator( 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 09aaaf8271..b6b0120451 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 @@ -90,7 +90,7 @@ class CallScreenPresenterTest { val analyticsLambda = lambdaRecorder {} val joinedCallLambda = lambdaRecorder {} val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, widgetProvider = widgetProvider, screenTracker = FakeScreenTracker(analyticsLambda), @@ -123,7 +123,7 @@ class CallScreenPresenterTest { fun `present - set message interceptor, send and receive messages`() = runTest { val widgetDriver = FakeMatrixWidgetDriver() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, screenTracker = FakeScreenTracker {}, ) @@ -154,7 +154,7 @@ class CallScreenPresenterTest { val navigator = FakeCallScreenNavigator() val widgetDriver = FakeMatrixWidgetDriver() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, navigator = navigator, dispatchers = testCoroutineDispatchers(useUnconfinedTestDispatcher = true), @@ -188,7 +188,7 @@ class CallScreenPresenterTest { val navigator = FakeCallScreenNavigator() val widgetDriver = FakeMatrixWidgetDriver() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, navigator = navigator, dispatchers = testCoroutineDispatchers(useUnconfinedTestDispatcher = true), @@ -223,7 +223,7 @@ class CallScreenPresenterTest { val navigator = FakeCallScreenNavigator() val widgetDriver = FakeMatrixWidgetDriver() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, navigator = navigator, dispatchers = testCoroutineDispatchers(useUnconfinedTestDispatcher = true), @@ -260,7 +260,7 @@ class CallScreenPresenterTest { val navigator = FakeCallScreenNavigator() val widgetDriver = FakeMatrixWidgetDriver() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, navigator = navigator, dispatchers = testCoroutineDispatchers(useUnconfinedTestDispatcher = true), @@ -300,7 +300,7 @@ class CallScreenPresenterTest { val matrixClient = FakeMatrixClient(syncService = syncService) val appForegroundStateService = FakeAppForegroundStateService() val presenter = createCallScreenPresenter( - callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID), + callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false), widgetDriver = widgetDriver, navigator = navigator, dispatchers = testCoroutineDispatchers(useUnconfinedTestDispatcher = true), diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallTypeTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallTypeTest.kt index 0c91b2159a..c83408bd3b 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallTypeTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallTypeTest.kt @@ -27,6 +27,7 @@ class CallTypeTest { CallType.RoomCall( sessionId = A_SESSION_ID, roomId = A_ROOM_ID, + isAudioCall = false, ).getSessionId() ).isEqualTo(A_SESSION_ID) } @@ -38,7 +39,7 @@ class CallTypeTest { @Test fun `RoomCall stringification does not contain the URL`() { - assertThat(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID).toString()) - .isEqualTo("RoomCall(sessionId=$A_SESSION_ID, roomId=$A_ROOM_ID)") + assertThat(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, false).toString()) + .isEqualTo("RoomCall(sessionId=$A_SESSION_ID, roomId=$A_ROOM_ID, isAudioCall=false)") } } diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultActiveCallManagerTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultActiveCallManagerTest.kt index 6a4a215aec..5650eaa47f 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultActiveCallManagerTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultActiveCallManagerTest.kt @@ -80,6 +80,7 @@ class DefaultActiveCallManagerTest { callType = CallType.RoomCall( sessionId = callNotificationData.sessionId, roomId = callNotificationData.roomId, + isAudioCall = false, ), callState = CallState.Ringing(callNotificationData) ) @@ -91,6 +92,28 @@ class DefaultActiveCallManagerTest { verify { notificationManagerCompat.notify(notificationId, any()) } } + @OptIn(ExperimentalCoroutinesApi::class) + @Test + fun `registerIncomingCall - sets the incoming audio call as active`() = runTest { + setupShadowPowerManager() + val notificationManagerCompat = mockk(relaxed = true) + val manager = createActiveCallManager(notificationManagerCompat = notificationManagerCompat) + + val callNotificationData = aCallNotificationData(audioOnly = true) + manager.registerIncomingCall(callNotificationData) + + assertThat(manager.activeCall.value).isEqualTo( + ActiveCall( + callType = CallType.RoomCall( + sessionId = callNotificationData.sessionId, + roomId = callNotificationData.roomId, + isAudioCall = true, + ), + callState = CallState.Ringing(callNotificationData) + ) + ) + } + @OptIn(ExperimentalCoroutinesApi::class) @Test fun `registerIncomingCall - when there is an already active call adds missed call notification`() = runTest { @@ -165,7 +188,7 @@ class DefaultActiveCallManagerTest { assertThat(manager.activeCall.value).isNotNull() assertThat(manager.activeWakeLock?.isHeld).isTrue() - manager.hangUpCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId)) + manager.hangUpCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId, false)) assertThat(manager.activeCall.value).isNull() assertThat(manager.activeWakeLock?.isHeld).isFalse() @@ -192,7 +215,7 @@ class DefaultActiveCallManagerTest { val notificationData = aCallNotificationData(roomId = A_ROOM_ID) manager.registerIncomingCall(notificationData) - manager.hangUpCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId)) + manager.hangUpCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId, false)) coVerify { room.declineCall(notificationEventId = notificationData.eventId) @@ -219,7 +242,7 @@ class DefaultActiveCallManagerTest { val notificationData = aCallNotificationData(roomId = A_ROOM_ID) // Do not register the incoming call, so the manager doesn't know about it manager.hangUpCall( - callType = CallType.RoomCall(notificationData.sessionId, notificationData.roomId), + callType = CallType.RoomCall(notificationData.sessionId, notificationData.roomId, false), notificationData = notificationData, ) coVerify { @@ -321,12 +344,13 @@ class DefaultActiveCallManagerTest { val manager = createActiveCallManager(notificationManagerCompat = notificationManagerCompat) assertThat(manager.activeCall.value).isNull() - manager.joinedCall(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID)) + manager.joinedCall(CallType.RoomCall(A_SESSION_ID, A_ROOM_ID, true)) assertThat(manager.activeCall.value).isEqualTo( ActiveCall( callType = CallType.RoomCall( sessionId = A_SESSION_ID, roomId = A_ROOM_ID, + isAudioCall = true, ), callState = CallState.InCall, ) @@ -429,6 +453,7 @@ class DefaultActiveCallManagerTest { callType = CallType.RoomCall( sessionId = callNotificationData.sessionId, roomId = callNotificationData.roomId, + isAudioCall = false, ), callState = CallState.Ringing(callNotificationData) ) diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultCallWidgetProviderTest.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultCallWidgetProviderTest.kt index 95d5398704..093abfcd32 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultCallWidgetProviderTest.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/DefaultCallWidgetProviderTest.kt @@ -31,7 +31,7 @@ class DefaultCallWidgetProviderTest { @Test fun `getWidget - fails if the session does not exist`() = runTest { val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.failure(Exception("Session not found")) }) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").isFailure).isTrue() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme").isFailure).isTrue() } @Test @@ -40,7 +40,7 @@ class DefaultCallWidgetProviderTest { givenGetRoomResult(A_ROOM_ID, null) } val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.success(client) }) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").isFailure).isTrue() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, true, "clientId", "languageTag", "theme").isFailure).isTrue() } @Test @@ -52,7 +52,7 @@ class DefaultCallWidgetProviderTest { givenGetRoomResult(A_ROOM_ID, room) } val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.success(client) }) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").isFailure).isTrue() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme").isFailure).isTrue() } @Test @@ -65,7 +65,7 @@ class DefaultCallWidgetProviderTest { givenGetRoomResult(A_ROOM_ID, room) } val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.success(client) }) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").isFailure).isTrue() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme").isFailure).isTrue() } @Test @@ -78,7 +78,7 @@ class DefaultCallWidgetProviderTest { givenGetRoomResult(A_ROOM_ID, room) } val provider = createProvider(matrixClientProvider = FakeMatrixClientProvider { Result.success(client) }) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").getOrNull()).isNotNull() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme").getOrNull()).isNotNull() } @Test @@ -101,7 +101,7 @@ class DefaultCallWidgetProviderTest { matrixClientProvider = FakeMatrixClientProvider { Result.success(client) }, activeRoomsHolder = activeRoomsHolder ) - assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme").isSuccess).isTrue() + assertThat(provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme").isSuccess).isTrue() } @Test @@ -122,7 +122,7 @@ class DefaultCallWidgetProviderTest { callWidgetSettingsProvider = settingsProvider, appPreferencesStore = preferencesStore, ) - provider.getWidget(A_SESSION_ID, A_ROOM_ID, "clientId", "languageTag", "theme") + provider.getWidget(A_SESSION_ID, A_ROOM_ID, false, "clientId", "languageTag", "theme") assertThat(settingsProvider.providedBaseUrls).containsExactly("https://custom.element.io") } diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt index 11e6d9e399..a76add7d28 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt @@ -23,6 +23,7 @@ class FakeCallWidgetProvider( override suspend fun getWidget( sessionId: SessionId, roomId: RoomId, + voiceOnly: Boolean, clientId: String, languageTag: String?, theme: String? diff --git a/features/call/test/src/main/kotlin/io/element/android/features/call/test/CallNotificationData.kt b/features/call/test/src/main/kotlin/io/element/android/features/call/test/CallNotificationData.kt index 2c7d1914c7..387a77ef8b 100644 --- a/features/call/test/src/main/kotlin/io/element/android/features/call/test/CallNotificationData.kt +++ b/features/call/test/src/main/kotlin/io/element/android/features/call/test/CallNotificationData.kt @@ -33,6 +33,7 @@ fun aCallNotificationData( timestamp: Long = 0L, expirationTimestamp: Long = 30_000L, textContent: String? = null, + audioOnly: Boolean = false, ): CallNotificationData = CallNotificationData( sessionId = sessionId, roomId = roomId, @@ -45,4 +46,5 @@ fun aCallNotificationData( timestamp = timestamp, expirationTimestamp = expirationTimestamp, textContent = textContent, + audioOnly = audioOnly ) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultCallNotificationEventResolverTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultCallNotificationEventResolverTest.kt index f406bccbb4..e8820a7389 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultCallNotificationEventResolverTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultCallNotificationEventResolverTest.kt @@ -9,6 +9,7 @@ package io.element.android.libraries.push.impl.notifications import com.google.common.truth.Truth.assertThat +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.NotificationContent import io.element.android.libraries.matrix.api.notification.RtcNotificationType import io.element.android.libraries.matrix.test.AN_EVENT_ID @@ -64,10 +65,11 @@ class DefaultCallNotificationEventResolverTest { senderAvatarUrl = null, expirationTimestamp = 1567L, rtcNotificationType = RtcNotificationType.RING, + callIntent = CallIntent.VIDEO ) val notificationData = aNotificationData( - content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.RING, 1567) + content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.RING, CallIntent.VIDEO, 1567) ) val result = resolver.resolveEvent(A_SESSION_ID, notificationData) assertThat(result.getOrNull()).isEqualTo(expectedResult) @@ -111,7 +113,7 @@ class DefaultCallNotificationEventResolverTest { ) val notificationData = aNotificationData( - content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.NOTIFY, 0) + content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.NOTIFY, CallIntent.AUDIO, 0) ) val result = resolver.resolveEvent(A_SESSION_ID, notificationData) assertThat(result.getOrNull()).isEqualTo(expectedResult) @@ -155,7 +157,7 @@ class DefaultCallNotificationEventResolverTest { ) val notificationData = aNotificationData( - content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.RING, 0) + content = NotificationContent.MessageLike.RtcNotification(A_USER_ID_2, RtcNotificationType.RING, CallIntent.VIDEO, 0) ) val result = resolver.resolveEvent(A_SESSION_ID, notificationData) assertThat(result.getOrNull()).isEqualTo(expectedResult) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt index 19ef74d0b9..a25e5782ba 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt @@ -14,6 +14,7 @@ import io.element.android.libraries.featureflag.test.FakeFeatureFlagService import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.exception.NotificationResolverException import io.element.android.libraries.matrix.api.media.MediaSource +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.NotificationContent import io.element.android.libraries.matrix.api.notification.NotificationData import io.element.android.libraries.matrix.api.notification.RtcNotificationType @@ -739,6 +740,7 @@ class DefaultNotifiableEventResolverTest { content = NotificationContent.MessageLike.RtcNotification( A_USER_ID_2, RtcNotificationType.NOTIFY, + CallIntent.VIDEO, 0 ), )) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/fixtures/NotifiableEventFixture.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/fixtures/NotifiableEventFixture.kt index 0ab39d5180..4242632fe5 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/fixtures/NotifiableEventFixture.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/fixtures/NotifiableEventFixture.kt @@ -13,6 +13,7 @@ import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.api.core.ThreadId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.notification.RtcNotificationType import io.element.android.libraries.matrix.api.timeline.item.event.EventType import io.element.android.libraries.matrix.test.AN_AVATAR_URL @@ -125,6 +126,7 @@ fun aNotifiableCallEvent( rtcNotificationType: RtcNotificationType = RtcNotificationType.NOTIFY, timestamp: Long = 0L, expirationTimestamp: Long = 0L, + callIntent: CallIntent = CallIntent.VIDEO, ) = NotifiableRingingCallEvent( sessionId = sessionId, eventId = eventId, @@ -142,6 +144,7 @@ fun aNotifiableCallEvent( roomAvatarUrl = roomAvatarUrl, senderAvatarUrl = senderAvatarUrl, rtcNotificationType = rtcNotificationType, + callIntent = callIntent, ) fun aFallbackNotifiableEvent( From 6bf706003455aaed4f35e3a5b6b58e4c34b655bc Mon Sep 17 00:00:00 2001 From: ElementBot Date: Thu, 5 Mar 2026 07:47:25 +0000 Subject: [PATCH 10/17] Update screenshots --- .../features.call.impl.ui_IncomingCallScreen_Day_0_en.png | 4 ++-- .../features.call.impl.ui_IncomingCallScreen_Day_1_en.png | 3 +++ .../features.call.impl.ui_IncomingCallScreen_Night_0_en.png | 4 ++-- .../features.call.impl.ui_IncomingCallScreen_Night_1_en.png | 3 +++ ...essages.impl.timeline.components_CallMenuItem_Day_2_en.png | 4 ++-- ...essages.impl.timeline.components_CallMenuItem_Day_3_en.png | 4 ++-- ...essages.impl.timeline.components_CallMenuItem_Day_4_en.png | 4 ++-- ...essages.impl.timeline.components_CallMenuItem_Day_6_en.png | 3 +++ ...essages.impl.timeline.components_CallMenuItem_Day_7_en.png | 3 +++ ...sages.impl.timeline.components_CallMenuItem_Night_2_en.png | 4 ++-- ...sages.impl.timeline.components_CallMenuItem_Night_3_en.png | 4 ++-- ...sages.impl.timeline.components_CallMenuItem_Night_4_en.png | 4 ++-- ...sages.impl.timeline.components_CallMenuItem_Night_6_en.png | 3 +++ ...sages.impl.timeline.components_CallMenuItem_Night_7_en.png | 3 +++ ...imeline.components_TimelineItemCallNotifyView_Day_0_en.png | 4 ++-- ...eline.components_TimelineItemCallNotifyView_Night_0_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsA11y_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_0_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_11_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_12_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_13_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_14_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_15_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_16_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_17_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_18_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_19_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_1_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_20_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_21_en.png | 4 ++-- .../features.roomdetails.impl_RoomDetailsDark_22_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_2_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_3_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_4_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_5_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_6_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_7_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_8_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetailsDark_9_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_0_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_11_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_12_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_13_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_14_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_15_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_16_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_17_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_18_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_19_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_1_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_20_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_21_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_22_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_2_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_3_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_4_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_5_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_6_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_7_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_8_en.png | 4 ++-- .../images/features.roomdetails.impl_RoomDetails_9_en.png | 4 ++-- ...rprofile.shared_UserProfileMainActionsSection_Day_0_en.png | 3 +++ ...rofile.shared_UserProfileMainActionsSection_Night_0_en.png | 3 +++ .../features.userprofile.shared_UserProfileView_Day_7_en.png | 4 ++-- ...features.userprofile.shared_UserProfileView_Night_7_en.png | 4 ++-- 65 files changed, 138 insertions(+), 114 deletions(-) create mode 100644 tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_1_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_1_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_6_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_7_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_6_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_7_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Day_0_en.png create mode 100644 tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Night_0_en.png diff --git a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_0_en.png b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_0_en.png index bcc1b05eb8..40ec97cbcc 100644 --- a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4dac0f93eb31b26fa32173fbd834c7f661e4f47c79db66fa4d1536d938a4585d -size 66108 +oid sha256:409723f9bf78cc7af140ab5798036fb17097bfdcb7e6e4d736de95a4e781015d +size 65778 diff --git a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_1_en.png b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_1_en.png new file mode 100644 index 0000000000..bcc1b05eb8 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Day_1_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dac0f93eb31b26fa32173fbd834c7f661e4f47c79db66fa4d1536d938a4585d +size 66108 diff --git a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_0_en.png b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_0_en.png index b656d1e06c..642b795865 100644 --- a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c3e5ef9368d68f661350a7a31b98b3ae3fbf975bc11d6f1b9e5ac908e6699dc -size 58355 +oid sha256:cf3c2e90c55f3e47a93c7e86aec979b2aeb3660688962d4b7e77e0878974cf76 +size 58125 diff --git a/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_1_en.png b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_1_en.png new file mode 100644 index 0000000000..b656d1e06c --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.call.impl.ui_IncomingCallScreen_Night_1_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c3e5ef9368d68f661350a7a31b98b3ae3fbf975bc11d6f1b9e5ac908e6699dc +size 58355 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_2_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_2_en.png index 4eaabb2986..4629a42727 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_2_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_2_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:435bb5f6ffa507744590e0dc8c2d4ef82dc8afa8487263a3a47a66beaf008dd2 -size 5801 +oid sha256:d78a84c0839258704c596870129fc20fb87d51cd3cc9617262cfd93c9b6f61fc +size 4549 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_3_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_3_en.png index 611e1c5bd5..4eaabb2986 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_3_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_3_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1265548ecc92fd1071b0b57b8ded488e13f346acaf28c586328b887a170deb6b -size 5350 +oid sha256:435bb5f6ffa507744590e0dc8c2d4ef82dc8afa8487263a3a47a66beaf008dd2 +size 5801 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_4_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_4_en.png index bd73e322ab..611e1c5bd5 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_4_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_4_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12020ba97720f2374f9ace172693f08be01522e4ca30d3970efa91d802581e81 -size 3657 +oid sha256:1265548ecc92fd1071b0b57b8ded488e13f346acaf28c586328b887a170deb6b +size 5350 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_6_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_6_en.png new file mode 100644 index 0000000000..4b00853fe8 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_6_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9eb227cae4fd1ab48ea957fa72cd2dd78dd4c5228ee01254eb33a7d936763802 +size 5989 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_7_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_7_en.png new file mode 100644 index 0000000000..bd73e322ab --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Day_7_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12020ba97720f2374f9ace172693f08be01522e4ca30d3970efa91d802581e81 +size 3657 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_2_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_2_en.png index c3a185ce70..21bcae81a2 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_2_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_2_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2496d499e15b138ad95ee9fdcc8c06cad5c755028918fabdb70a5be7300b2bc4 -size 5538 +oid sha256:2235c88d591b890cd208499d60a7d395d4b0926eee804257c20b634bbf83354f +size 4485 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_3_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_3_en.png index 844aa3ccc6..c3a185ce70 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_3_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_3_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:087c7ec1aead0e7aa5b4cebd14bddb52e17ae1f9aeb51e7c00aab8a409b52922 -size 5365 +oid sha256:2496d499e15b138ad95ee9fdcc8c06cad5c755028918fabdb70a5be7300b2bc4 +size 5538 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_4_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_4_en.png index bd73e322ab..844aa3ccc6 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_4_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_4_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12020ba97720f2374f9ace172693f08be01522e4ca30d3970efa91d802581e81 -size 3657 +oid sha256:087c7ec1aead0e7aa5b4cebd14bddb52e17ae1f9aeb51e7c00aab8a409b52922 +size 5365 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_6_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_6_en.png new file mode 100644 index 0000000000..a4fc7a78b3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_6_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:013bb9352e9885a79781c25dcd864234478b1e5ce669b4c95765c25fd7af0424 +size 5674 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_7_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_7_en.png new file mode 100644 index 0000000000..bd73e322ab --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_CallMenuItem_Night_7_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12020ba97720f2374f9ace172693f08be01522e4ca30d3970efa91d802581e81 +size 3657 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Day_0_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Day_0_en.png index c989382a75..2a713b1b39 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Day_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Day_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6853c47a1baae81166006f3a991a8bef0ebb8615b9a6058ec93d289d64642ceb -size 37759 +oid sha256:155ad78cfadaab78089293eca38ab8c404f227e38c451dddbbe3c59cccb82bc5 +size 51391 diff --git a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Night_0_en.png b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Night_0_en.png index b69c21d27b..77fd3bfa80 100644 --- a/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Night_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components_TimelineItemCallNotifyView_Night_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b0943712beb4e68d3a6ea828aee4c95c6ec874652a7f7e04d33e615b794c8dd1 -size 37674 +oid sha256:8b54d16054565d3ba0280ff704c350227a03db0fad93750ad6d41f6e67f605f3 +size 51582 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsA11y_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsA11y_en.png index 96a6154bae..42f695d569 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsA11y_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsA11y_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed7e04d993469a6b7385d511bb4ccaffc8dc61001fce454716c4db584ae6e971 -size 78502 +oid sha256:7f74b2d87e7dd5e431c6d6add3131472d31c9ffcce900736ed489af2c667783c +size 78968 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_0_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_0_en.png index 758600e684..45c428bf80 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4990d60bc18f94875488edb048fda5baf6efafab6bd84341cde6aeb083b3374c -size 42658 +oid sha256:c5ec03b736a2b1c641747a49be5417a3e9b6e034c865294bfd71a5bed8f53834 +size 42930 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_11_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_11_en.png index 87236db8ab..1408646027 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_11_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_11_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fca6805fc467e91656124ed2287c170d7a4888e9c9e74c58341c44bb98767948 -size 40505 +oid sha256:0bbf72a26a32f180d1dddc276adda01fb8586e6c182b32dde35d7daca55bc6ae +size 40765 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_12_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_12_en.png index 02e8aa0cee..ff177b8e06 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_12_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_12_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d08756e2c0dfe00c5239264c664c048156f3f49f18d07a4db5792e01ba78170 -size 41933 +oid sha256:5fb05bc1ca83f872c88b36097fca767c36fa0688c19bd504674846707eedc358 +size 42192 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_13_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_13_en.png index 96e7a10d18..e7fcdbf5a2 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_13_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_13_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1d5811a68186da4ef5c1eb4b5d272571326016bbc3d29630e49efcbfaea7c92 -size 41841 +oid sha256:7fe45d21c630e31b44ae7a8cb17b9f89b0b0f67d00b3769035516f0e827f64a2 +size 42098 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_14_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_14_en.png index 03e4695137..cf005e1dfc 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_14_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_14_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0103a8787c5546373b79b9b3aa1455581b9af2e2bcc4e9b515ab6a94ba3cc6ac -size 42392 +oid sha256:de164fd028b96c6c53ae2e33246bfb5bda1e6beba1c91cbd00111d2fbba92cd8 +size 42658 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_15_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_15_en.png index 06e3fc99a9..3696ac101a 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_15_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_15_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa72f5bbb796ec897e7fffb85c4918d89a1cecbd224cdfa4edff365fc7370067 -size 42923 +oid sha256:dd7a8279d58ba0420c884cdcbf1972772d2d577024c3b766cd535c5cabfe8cba +size 43196 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_16_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_16_en.png index e7675977af..89ce64548b 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_16_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_16_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:077d29a411a1315d6706a022b8ca3509224b0d36394bd0f8609d297bfd2e978f -size 42181 +oid sha256:59d38b1cde9e22b1c47b2c7932ba980b2c56af2fa8b6b25200cb46ee3a0cd145 +size 42440 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_17_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_17_en.png index 8c3488e4d7..0a8eb52edb 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_17_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_17_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2446123585802cf662ecf56bd971155fc128fd96db07f33e94d43a4b9b9787c1 -size 41443 +oid sha256:de0c605c7845f2e590aba1d0484700bdecb80effc16899b6288301cd91a9d966 +size 41703 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_18_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_18_en.png index 188145c3e5..e35c1c48d5 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_18_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_18_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4865d30ef99fa80c05666ef66d92777230e8e3997efb3e379a600507870ff89d -size 38649 +oid sha256:88a2e1d2000e3034fa2d9e37b3b69aa47a7f588fee40efb8a8c74f9292315ea1 +size 39678 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_19_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_19_en.png index 64d355b501..6f325f6503 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_19_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_19_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbe1e721ebc0a8fa8f4ff9a10018e2e40f17c8082404dbf30a8d48d661abe14d -size 38605 +oid sha256:59c7e92e09d585e18f552db5e9fa55dfe79cb6af028493cafc11f0ffee8344bd +size 39634 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_1_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_1_en.png index 537fa3025d..26dfe2ec3f 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_1_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_1_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e86ae772e54f80d45945426aaefc75eb4e9f300a573b80b1b25c605bcb07b63 -size 37836 +oid sha256:405b81267a5a14771a69c8b06efea888b2fdc588bec26872b9564a66bb5496cf +size 38110 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_20_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_20_en.png index 41ad7b998d..573476b244 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_20_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_20_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3404c7ea44f0e508599ed5ef52931d240ace0521abf07d8200a18ad2ec746631 -size 44910 +oid sha256:b7b0f5cbfc01a4539757611a9800d18ed19cb732e44eee4f1bed41788d4b0918 +size 45142 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_21_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_21_en.png index 129fd194cc..f3df601803 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_21_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_21_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:67c89ba55452cca28cc7a0a6f7035a1613b2c5dc35116689a00a40b66e8e9abc -size 44745 +oid sha256:acd1c2c73c21370b816792de80d0183bacadb213cf0bf005c73695df553fad3a +size 44979 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_22_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_22_en.png index a0811aebdd..1d12fe7bb6 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_22_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_22_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6f99a0af76390c056389bd0559454de5f95e65a5cec8c978951956e0e9c14b8a -size 44378 +oid sha256:0ad520c5dc49852a8934bc85fcbcd982e500e8d9818635605abacfc51f29dfde +size 44621 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_2_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_2_en.png index fa08185864..c95ef29bb7 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_2_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_2_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a311ba8cdc8b092f854f262e87dc2c402812eaf4ff507baf4909939a56be4343 -size 36337 +oid sha256:4bf88dda52209b3ff194c70a4c783a8e3765c352d58eb00cb0dd9aa16d3c6578 +size 36614 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_3_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_3_en.png index 3b5b2e55b8..31c90c349b 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_3_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_3_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8acfda3d05ce66e76577213eada50568fd5c8ab06219c5e3ec5456140e7de787 -size 42086 +oid sha256:09c7b2efe4a3dba7028810fb10dbc7a3c3be4e1fc012319bd868bb3d392487ae +size 42344 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_4_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_4_en.png index ae6222378d..9685ef8b53 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_4_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_4_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5d8cb157c74b3415bc138790a57021585df7b9a48833a01e2843bf4b4a199d0 -size 41105 +oid sha256:5132f788bbfb0fe37254ebf53823f04ab0c303cc65770a3a089f8e7a3e2277e5 +size 41374 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_5_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_5_en.png index cbe3ca1483..3f8fafe409 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_5_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_5_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9357e6b9fc086812a64ccbac15af5277d1be8b9d35acc94e0da855269dd8065b -size 38293 +oid sha256:3f36006f661e4dfb2c8669983194f5b22cf54292bc975939c9a8c2832b47b799 +size 39320 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_6_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_6_en.png index 5049251509..8f9a9d52ae 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_6_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_6_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:92b4ad9b47dd662f495d0788fb28b855f723b6f12c932287060b3268d2783d85 -size 41643 +oid sha256:51100671549be5aee9e67f2e43f22015b75edb3d39fa1f900481416d1d65e8b3 +size 42689 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_7_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_7_en.png index 34d7b1db25..0d7b0cc086 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_7_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_7_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe11656c915a10c13b45ffce52634efd4b357136ec42d270114f688b41eb12c5 -size 42866 +oid sha256:07ec8a7ab75acad9b31b6e6352f0e79cfc473fe7756c55c3101977b680136ce9 +size 43113 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_8_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_8_en.png index 3c5a32ccaf..b313a4d8c2 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_8_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_8_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f25a62cf9d5a6929f660aaf6dc15da17686a42b07e799db0f46cc00d98b6038f -size 41859 +oid sha256:bc85e38b6ec98b12c4fe40b0338dc80033120d5224007b1e8f641165d313ca0b +size 42119 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_9_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_9_en.png index 51957a60c2..ad1ad1f828 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_9_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetailsDark_9_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df93745b7bc26a0974204af9460d246bdb27d4d99e92520abdbcd0237226033a -size 41967 +oid sha256:2c13a57f8e460a7f6b06b1d81c10b3a2bc8dfbcda9bd2bd7c7d5224374a1b192 +size 42108 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_0_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_0_en.png index 7644de1cc1..15958517a5 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2dc3581c56ccbfe37efb0fcae7998fb2169b57a86dc9710653f3e5fd38e60076 -size 43401 +oid sha256:cdbbba4d6ebf3eac1d096fe13e5685aa10ab90972af322975fa2b3687737afb9 +size 43656 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_11_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_11_en.png index 4d460bd2e6..bccf06c807 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_11_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_11_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:318f191a6b012a445c4bc93d52aa015bfd18fff22257787dfdccff95a4a98509 -size 41223 +oid sha256:446a52c50158d9855269dbe62746d6a5fea94a6850d16fb29763b6b3bda67cd9 +size 41472 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_12_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_12_en.png index 9c6d518685..0729f52acb 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_12_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_12_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e87bf7c44509e1df0884141a75ff8c6e7d186cd2511c8e8a8ae974a5123a51c2 -size 42662 +oid sha256:0e518928f4a23a4e72cd09e300d332ce75a700ca4baf573fe48af509fe73418a +size 42929 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_13_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_13_en.png index 878d63c125..db83e1f900 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_13_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_13_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eed74faa57b8eb42b5d1a61b9cda7e9a3cad7c67e894049f8b7f17672d06f73c -size 42594 +oid sha256:6e5cdb25bd944c13580ff2f8b5142e2c2793965bb233c7f663cdf45bde96bf26 +size 42855 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_14_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_14_en.png index cc52358007..31ec0d63a0 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_14_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_14_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6284ae879aaed961e698854b5c7ace5221717d815aa64aa186c9560db175a16b -size 43117 +oid sha256:a364c3b8edd68c4e4c944844db649cb22ac5db8931836a7f91d4d0f65329e4a5 +size 43374 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_15_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_15_en.png index 2a41fcc552..5412e027aa 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_15_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_15_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7424e68d5b9a116f28c8506791b9ad13db80dbbe86f77ec741589a8a8194d3a6 -size 43717 +oid sha256:4ab0a2daf8d2fc3b918b2fb3c9a860979476e0fa534a074089559d77952f9997 +size 43973 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_16_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_16_en.png index eb8de43bae..51024557dc 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_16_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_16_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:171ebd2a62d5028634164794df0a2a40858ca04c8138b5170b7012f9644a458c -size 42942 +oid sha256:5d0c501c1b3f14d71af64d98c6487cbea150ca6b8e72f0f4675b16aa4fcaba4e +size 43199 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_17_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_17_en.png index 93357a48d4..89840a00a9 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_17_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_17_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e4a473cc8c12683ff228d419c14331cf2552f7d39a0be2a64c79955ef25a320 -size 42424 +oid sha256:ef7b68c5f009bb02529313f0330e0c3563e1840395ac4d306cb52e1ce34bbc57 +size 42689 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_18_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_18_en.png index 9af6ea36f6..0bc9a6df9d 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_18_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_18_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:777172c5a2ff187985a30ea2b95c26935606331a0714bfac3ecdccc1289e4b0d -size 39321 +oid sha256:44fc7317e29697583ba1beace7a4cb0dd366e25d1e54878be5ebeb76eea9db3d +size 40374 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_19_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_19_en.png index ced22a00d9..ab59d161e8 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_19_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_19_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b45ab98fbe65b730cd1a6bdece0719fd970e2f1c1add7bd413afeb4b0efa48c -size 39196 +oid sha256:77ad55f57eac496eec3d8f9dbbb448ed75d3bf0e9ecb0818c0fe2517c6936605 +size 40242 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_1_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_1_en.png index 53fb194738..6ea6d355c2 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_1_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_1_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e790ffea7208dd35d99323cebe8cf197055606c2f0891343c7d8c4ad8190f73 -size 38703 +oid sha256:959c978957721a609fa30439b3fa6dabda4fad6bf270fe40b383b380f75e08f5 +size 38962 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_20_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_20_en.png index 79c39b3218..4c60c59031 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_20_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_20_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:29f5785c464ed5bfb5ecb6f62c87f4958364d498c5d70d0790d5109a86043663 -size 45854 +oid sha256:4608b96994eef19bd9f712324d1d0c53922dc9856aa4da8c6e2a645e6abc2d84 +size 46097 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_21_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_21_en.png index 8a80208f31..bf6142d66d 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_21_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_21_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce6372b70c26489f026896216e9e246917574d6a5585b935df6c88bf035d9b31 -size 45599 +oid sha256:37bfa4e42fdca66940aca53335958935d37f027ae38088d04117936caae83740 +size 45841 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_22_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_22_en.png index cab3f77550..5bd41696fb 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_22_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_22_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb9d46b0fff0d07394b82b01b1b108065dccc4ac605d8eee7216a7e4b193c8b6 -size 45280 +oid sha256:b536ee9e04ee12f64ce37ffb27bb1e60100fd9f817e07ddc50e396eb567519e1 +size 45513 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_2_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_2_en.png index 90e9aff716..123d33df18 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_2_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_2_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8403ca55299c3e774300965626a0c893d1f244860d68fc0dc481a3a747780a21 -size 37131 +oid sha256:b0da00de6d2570c210920bfbeb0caec61390f795aa9f6ab08afdfc6ecb228fe8 +size 37385 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_3_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_3_en.png index fddab5294a..b07c5d98ae 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_3_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_3_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a07517e187428cdb592b6f9669291485666ef64c0316b85ab8f454ffdfc04f98 -size 42810 +oid sha256:9eeb48387ff960b03efbd78eb360a75db4e997550a56613d9c577032c7254086 +size 43071 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_4_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_4_en.png index 26b2a41d40..ab58c7930f 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_4_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_4_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f6dcb65141ffa72f3860b8391801130c006cd225c877a4c97d434661ebca98ee -size 41823 +oid sha256:ea8aabb87ff7bd6c97e892183d1d680043024c2966ea2c846147f99198238e3b +size 42076 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_5_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_5_en.png index ee8b7b542a..44753c8d7c 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_5_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_5_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e26eb6075ddeb76891a3c35cfa5f7a98d551b118d5c9330066b7328692a38609 -size 38852 +oid sha256:59a2ea7ae299bdc50c5fae263792034083837d6b693b7006e8f67b0d6ba53238 +size 39903 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_6_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_6_en.png index a6cc92d46e..d6afca2835 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_6_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_6_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b1f8724405ae44c6ef7d520910c71fa77090ce47c1302ce6d062694eecaf0843 -size 42350 +oid sha256:e6dc12c6ede2e635bf99eca3d1d5994b7b15cceade074835d8751184203f902a +size 43437 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_7_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_7_en.png index 8c2e6a0997..9680df6edf 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_7_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_7_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07ef41f138117ef809ae3f73e5cb9825e053a562390a735fd0714934d196ba56 -size 43763 +oid sha256:237628b9401f68f6470fd27b31368959735209343226a7fc527042e02944bfce +size 44062 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_8_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_8_en.png index 21c0f435af..9b76e484c5 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_8_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_8_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c4c5ca6a65408f713d6cff16b7b2567f1e08be59d193ff7bbbe7413cdab14b7 -size 42718 +oid sha256:b86881ab66a8dc3168c12b26f376f7e1f8f906106c695f79d40c83450abdfb87 +size 42974 diff --git a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_9_en.png b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_9_en.png index f4579744e0..35a76b346e 100644 --- a/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_9_en.png +++ b/tests/uitests/src/test/snapshots/images/features.roomdetails.impl_RoomDetails_9_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3011751e86e1e936b801427b1bd9deb2b3322390397e0b3d4c92014b1ca67f82 -size 42764 +oid sha256:4f37c7d7f53a3b45f5b1ba899b0aae0ad4d0fcf05e02ad5e3f22d0dc48ff99d8 +size 42920 diff --git a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Day_0_en.png b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Day_0_en.png new file mode 100644 index 0000000000..458ff7c8cd --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Day_0_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b67fe00c2ef9985d7628031dd263f8ceb04093a2ddd646d1ad9f21839787922 +size 11957 diff --git a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Night_0_en.png b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Night_0_en.png new file mode 100644 index 0000000000..058f88ca25 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileMainActionsSection_Night_0_en.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94872c67cb5a418285b2dc44b98415f9024bc498c6f10c8ed84564f8ebd38dc8 +size 11280 diff --git a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Day_7_en.png b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Day_7_en.png index b2a9191ce8..1c84803007 100644 --- a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Day_7_en.png +++ b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Day_7_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:737eb8c3a44b0305fd8de5c6601be3228bc094e1d40cf5e2c3724747844ae330 -size 24942 +oid sha256:fa809d53b1ad821c047fabc9b655e47150e201941e004d5b8f769a0ebe1a2b74 +size 26629 diff --git a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Night_7_en.png b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Night_7_en.png index 9fa11eb801..46417d9248 100644 --- a/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Night_7_en.png +++ b/tests/uitests/src/test/snapshots/images/features.userprofile.shared_UserProfileView_Night_7_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51dbd0ef969b6c0719a5957d8438e1f0b81b3c8c9e3e6b861f6f3ef18c847b8e -size 24255 +oid sha256:8b6f0f76fd0bb0f6f8dc9532c801d86e7574e53a62e828400c2fcfcf5fe9fe29 +size 25880 From 7897101009d494bedc7f09b0e446f1d195f61909 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 5 Mar 2026 10:09:10 +0100 Subject: [PATCH 11/17] fix test for voice call button --- .../messages/impl/MessagesPresenter.kt | 1 - .../features/messages/impl/MessagesState.kt | 1 - .../messages/impl/MessagesStateProvider.kt | 1 - .../impl/timeline/components/CallMenuItem.kt | 2 +- .../messages/impl/MessagesViewTest.kt | 23 +++++++++++++++++-- .../impl/timeline/TimelineViewTest.kt | 3 +-- .../src/main/res/values/localazy.xml | 1 + 7 files changed, 24 insertions(+), 8 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt index 2c2fda6fbb..d9c3d17afa 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt @@ -271,7 +271,6 @@ class MessagesPresenter( return MessagesState( roomId = room.roomId, - isDm = roomInfo.isDm, roomName = roomInfo.name, roomAvatar = roomAvatar, heroes = heroes, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt index 7b9b7b739c..c18fb461e0 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt @@ -32,7 +32,6 @@ import kotlinx.collections.immutable.ImmutableList data class MessagesState( val roomId: RoomId, val roomName: String?, - val isDm: Boolean, val roomAvatar: AvatarData, val heroes: ImmutableList, val userEventPermissions: UserEventPermissions, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt index 0f12973158..d969ae1491 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt @@ -126,7 +126,6 @@ fun aMessagesState( ) = MessagesState( roomId = RoomId("!id:domain"), roomName = roomName, - isDm = false, roomAvatar = roomAvatar, heroes = persistentListOf(), userEventPermissions = userEventPermissions, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index 3a9c07fa4d..1345bf23a3 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -76,7 +76,7 @@ private fun StandByCallMenuItem( ) { Icon( imageVector = CompoundIcons.VoiceCallSolid(), - contentDescription = stringResource(CommonStrings.a11y_start_call), + contentDescription = stringResource(CommonStrings.a11y_start_voice_call), ) } } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesViewTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesViewTest.kt index c6d974bae7..c78aa39265 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesViewTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesViewTest.kt @@ -53,6 +53,7 @@ import io.element.android.features.messages.impl.timeline.components.receipt.aRe import io.element.android.features.messages.impl.timeline.components.receipt.bottomsheet.ReadReceiptBottomSheetEvent import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemTextContent +import io.element.android.features.roomcall.api.aStandByCallState import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.room.tombstone.SuccessorRoom @@ -71,6 +72,7 @@ import io.element.android.tests.testutils.EventsRecorder import io.element.android.tests.testutils.assertNoNodeWithText import io.element.android.tests.testutils.clickOn import io.element.android.tests.testutils.ensureCalledOnce +import io.element.android.tests.testutils.ensureCalledOnceWithParam import io.element.android.tests.testutils.pressBack import io.element.android.tests.testutils.setSafeContent import kotlinx.collections.immutable.persistentListOf @@ -122,7 +124,7 @@ class MessagesViewTest { val state = aMessagesState( eventSink = eventsRecorder ) - ensureCalledOnce { callback -> + ensureCalledOnceWithParam(false) { callback -> rule.setMessagesView( state = state, onJoinCallClick = callback, @@ -132,6 +134,23 @@ class MessagesViewTest { } } + @Test + fun `clicking on join voice call invoke expected callback`() { + val eventsRecorder = EventsRecorder(expectEvents = false) + val state = aMessagesState( + eventSink = eventsRecorder, + roomCallState = aStandByCallState(isDM = true) + ) + ensureCalledOnceWithParam(true) { callback -> + rule.setMessagesView( + state = state, + onJoinCallClick = callback, + ) + val joinVoiceCallContentDescription = rule.activity.getString(CommonStrings.a11y_start_voice_call) + rule.onNodeWithContentDescription(joinVoiceCallContentDescription).performClick() + } + } + @Test fun `clicking on an Event invoke expected callback`() { val eventsRecorder = EventsRecorder(expectEvents = false) @@ -609,7 +628,7 @@ private fun AndroidComposeTestRule.setMessa onLinkClick: (String, Boolean) -> Unit = EnsureNeverCalledWithTwoParams(), onSendLocationClick: () -> Unit = EnsureNeverCalled(), onCreatePollClick: () -> Unit = EnsureNeverCalled(), - onJoinCallClick: () -> Unit = EnsureNeverCalled(), + onJoinCallClick: (Boolean) -> Unit = EnsureNeverCalledWithParam(), onViewAllPinnedMessagesClick: () -> Unit = EnsureNeverCalled(), ) { setSafeContent { diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelineViewTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelineViewTest.kt index c56641a048..be10d8b738 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelineViewTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelineViewTest.kt @@ -30,7 +30,6 @@ import io.element.android.libraries.matrix.api.timeline.Timeline import io.element.android.libraries.matrix.api.timeline.item.event.MessageShield import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.ui.strings.CommonStrings -import io.element.android.tests.testutils.EnsureNeverCalled import io.element.android.tests.testutils.EnsureNeverCalledWithParam import io.element.android.tests.testutils.EnsureNeverCalledWithTwoParams import io.element.android.tests.testutils.EventsRecorder @@ -186,7 +185,7 @@ private fun AndroidComposeTestRule.setTimel onReactionLongClick: (emoji: String, TimelineItem.Event) -> Unit = EnsureNeverCalledWithTwoParams(), onMoreReactionsClick: (TimelineItem.Event) -> Unit = EnsureNeverCalledWithParam(), onReadReceiptClick: (TimelineItem.Event) -> Unit = EnsureNeverCalledWithParam(), - onJoinCallClick: () -> Unit = EnsureNeverCalled(), + onJoinCallClick: (Boolean) -> Unit = EnsureNeverCalledWithParam(), forceJumpToBottomVisibility: Boolean = false, ) { setSafeContent(clearAndroidUiDispatcher = true) { diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 90eb61253d..d54740113a 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -48,6 +48,7 @@ "Time limited action required, you have one minute to verify" "Show password" "Start a call" + "Start a voice call" "Tombstoned room" "User avatar" "User menu" From c67a76fbda152fc08431b15d711bd997577a4381 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 5 Mar 2026 10:46:20 +0100 Subject: [PATCH 12/17] fix call state presenter test --- .../impl/RoomCallStatePresenterTest.kt | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/features/roomcall/impl/src/test/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenterTest.kt b/features/roomcall/impl/src/test/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenterTest.kt index bdececf584..0a561ad59a 100644 --- a/features/roomcall/impl/src/test/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenterTest.kt +++ b/features/roomcall/impl/src/test/kotlin/io/element/android/features/roomcall/impl/RoomCallStatePresenterTest.kt @@ -41,6 +41,7 @@ class RoomCallStatePresenterTest { assertThat(initialState).isEqualTo( RoomCallState.StandBy( canStartCall = false, + isDM = false ) ) } @@ -79,6 +80,28 @@ class RoomCallStatePresenterTest { assertThat(initialState).isEqualTo( RoomCallState.StandBy( canStartCall = true, + isDM = false + ) + ) + } + } + + @Test + fun `present - initial state - when is direct room`() = runTest { + val room = FakeJoinedRoom( + baseRoom = FakeBaseRoom( + initialRoomInfo = aRoomInfo(isDirect = true), + roomPermissions = roomPermissions(true), + ) + ) + val presenter = createRoomCallStatePresenter(joinedRoom = room) + presenter.test { + skipItems(1) + val initialState = awaitItem() + assertThat(initialState).isEqualTo( + RoomCallState.StandBy( + canStartCall = true, + isDM = true ) ) } @@ -98,6 +121,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = false, + isAudioCall = false, isUserInTheCall = false, isUserLocallyInTheCall = false, ) @@ -125,6 +149,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = true, + isAudioCall = false, isUserInTheCall = true, isUserLocallyInTheCall = false, ) @@ -155,6 +180,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = true, + isAudioCall = false, isUserInTheCall = true, isUserLocallyInTheCall = true, ) @@ -187,6 +213,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = true, + isAudioCall = false, isUserInTheCall = true, isUserLocallyInTheCall = true, ) @@ -195,6 +222,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = true, + isAudioCall = false, isUserInTheCall = true, isUserLocallyInTheCall = false, ) @@ -208,6 +236,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.OnGoing( canJoinCall = true, + isAudioCall = false, isUserInTheCall = false, isUserLocallyInTheCall = false, ) @@ -221,6 +250,7 @@ class RoomCallStatePresenterTest { assertThat(awaitItem()).isEqualTo( RoomCallState.StandBy( canStartCall = true, + isDM = false ) ) } From dd0143bf623014dd73503ae70652dbf461448016 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 5 Mar 2026 11:28:38 +0100 Subject: [PATCH 13/17] fix RoomDetailsViewTest --- .../roomdetails/impl/RoomDetailsViewTest.kt | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsViewTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsViewTest.kt index b31fb32e8b..588a10a218 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsViewTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsViewTest.kt @@ -18,6 +18,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import io.element.android.features.roomdetails.impl.members.aRoomMember import io.element.android.features.userprofile.shared.aUserProfileState import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.test.A_USER_ID import io.element.android.libraries.testtags.TestTags @@ -121,7 +122,25 @@ class RoomDetailsViewTest { @Test fun `click on call invokes expected callback`() { - ensureCalledOnce { callback -> + ensureCalledOnceWithParam(CallIntent.AUDIO) { callback -> + rule.setRoomDetailView( + state = aRoomDetailsState( + eventSink = EventsRecorder(expectEvents = false), + canInvite = true, + roomType = RoomDetailsType.Dm( + aRoomMember(UserId("@me:local.org")), + aRoomMember(UserId("@other:local.org")) + ), + ), + onJoinCallClick = callback, + ) + rule.clickOn(CommonStrings.action_call) + } + } + + @Test + fun `click on video call invokes expected callback`() { + ensureCalledOnceWithParam(CallIntent.VIDEO) { callback -> rule.setRoomDetailView( state = aRoomDetailsState( eventSink = EventsRecorder(expectEvents = false), @@ -129,7 +148,7 @@ class RoomDetailsViewTest { ), onJoinCallClick = callback, ) - rule.clickOn(CommonStrings.action_call) + rule.clickOn(CommonStrings.common_video) } } @@ -343,7 +362,7 @@ private fun AndroidComposeTestRule.setRoomD openPollHistory: () -> Unit = EnsureNeverCalled(), openMediaGallery: () -> Unit = EnsureNeverCalled(), openAdminSettings: () -> Unit = EnsureNeverCalled(), - onJoinCallClick: () -> Unit = EnsureNeverCalled(), + onJoinCallClick: (CallIntent) -> Unit = EnsureNeverCalledWithParam(), onPinnedMessagesClick: () -> Unit = EnsureNeverCalled(), onKnockRequestsClick: () -> Unit = EnsureNeverCalled(), onSecurityAndPrivacyClick: () -> Unit = EnsureNeverCalled(), From 874311011a6d11df0bbe66d2c14b6cb8a4dfccb7 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 5 Mar 2026 12:14:42 +0100 Subject: [PATCH 14/17] fix tests --- .../userprofile/UserProfileViewTest.kt | 19 +++++++++++++++++-- .../oidc/AccountManagementActionKtTest.kt | 6 +++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/features/userprofile/shared/src/test/kotlin/io/element/android/features/userprofile/UserProfileViewTest.kt b/features/userprofile/shared/src/test/kotlin/io/element/android/features/userprofile/UserProfileViewTest.kt index dc41fb31c8..83b10e2a53 100644 --- a/features/userprofile/shared/src/test/kotlin/io/element/android/features/userprofile/UserProfileViewTest.kt +++ b/features/userprofile/shared/src/test/kotlin/io/element/android/features/userprofile/UserProfileViewTest.kt @@ -23,6 +23,7 @@ import io.element.android.features.userprofile.shared.aUserProfileState import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.notification.CallIntent import io.element.android.libraries.matrix.test.AN_AVATAR_URL import io.element.android.libraries.matrix.test.A_ROOM_ID import io.element.android.libraries.matrix.test.A_USER_ID @@ -105,7 +106,7 @@ class UserProfileViewTest { @Test fun `on Call clicked - the expected callback is called`() = runTest { - ensureCalledOnceWithParam(A_ROOM_ID) { callback -> + ensureCalledOnceWithTwoParams(A_ROOM_ID, CallIntent.AUDIO) { callback -> rule.setUserProfileView( state = aUserProfileState( dmRoomId = A_ROOM_ID, @@ -117,6 +118,20 @@ class UserProfileViewTest { } } + @Test + fun `on Video Call clicked - the expected callback is called`() = runTest { + ensureCalledOnceWithTwoParams(A_ROOM_ID, CallIntent.VIDEO) { callback -> + rule.setUserProfileView( + state = aUserProfileState( + dmRoomId = A_ROOM_ID, + canCall = true, + ), + onStartCall = callback, + ) + rule.clickOn(CommonStrings.common_video) + } + } + @Config(qualifiers = "h1024dp") @Test fun `on Block user clicked - a BlockUser event is emitted with needsConfirmation`() = runTest { @@ -216,7 +231,7 @@ private fun AndroidComposeTestRule.setUserP ), onShareUser: () -> Unit = EnsureNeverCalled(), onDmStarted: (RoomId) -> Unit = EnsureNeverCalledWithParam(), - onStartCall: (RoomId) -> Unit = EnsureNeverCalledWithParam(), + onStartCall: (RoomId, CallIntent) -> Unit = EnsureNeverCalledWithTwoParams(), onVerifyClick: (UserId) -> Unit = EnsureNeverCalledWithParam(), goBack: () -> Unit = EnsureNeverCalled(), openAvatarPreview: (String, String) -> Unit = EnsureNeverCalledWithTwoParams(), diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementActionKtTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementActionKtTest.kt index 8115465679..0e0cab414e 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementActionKtTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/oidc/AccountManagementActionKtTest.kt @@ -20,10 +20,10 @@ class AccountManagementActionKtTest { assertThat(AccountManagementAction.Profile.toRustAction()) .isEqualTo(RustAccountManagementAction.Profile) assertThat(AccountManagementAction.SessionEnd(A_DEVICE_ID).toRustAction()) - .isEqualTo(RustAccountManagementAction.SessionEnd(A_DEVICE_ID.value)) + .isEqualTo(RustAccountManagementAction.DeviceDelete(A_DEVICE_ID.value)) assertThat(AccountManagementAction.SessionView(A_DEVICE_ID).toRustAction()) - .isEqualTo(RustAccountManagementAction.SessionView(A_DEVICE_ID.value)) + .isEqualTo(RustAccountManagementAction.DeviceView(A_DEVICE_ID.value)) assertThat(AccountManagementAction.SessionsList.toRustAction()) - .isEqualTo(RustAccountManagementAction.SessionsList) + .isEqualTo(RustAccountManagementAction.DevicesList) } } From 79d8ec16b94693d7097323f852a063e20014d584 Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 6 Mar 2026 12:12:32 +0100 Subject: [PATCH 15/17] review: Rename aIncomingCallScreenState to aCallNotificationData --- .../features/call/impl/ui/CallNotificationDataProvider.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt index 76ef1f77cd..3a51a014df 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallNotificationDataProvider.kt @@ -17,16 +17,16 @@ import io.element.android.libraries.matrix.api.core.UserId open class CallNotificationDataProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( - aIncomingCallScreenState( + aCallNotificationData( audioOnly = false ), - aIncomingCallScreenState( + aCallNotificationData( audioOnly = true ), ) } -internal fun aIncomingCallScreenState( +internal fun aCallNotificationData( audioOnly: Boolean ): CallNotificationData { return CallNotificationData( From 4406b50542dbbdabf9301e5596f7ef1d6c274e51 Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 6 Mar 2026 12:15:20 +0100 Subject: [PATCH 16/17] review: fix bad usage of modifier --- .../features/messages/impl/timeline/components/CallMenuItem.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index 1345bf23a3..a370866f1e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -70,7 +70,6 @@ private fun StandByCallMenuItem( // Only show voice call in DMs if (roomCallState.isDM) { IconButton( - modifier = modifier, onClick = { onJoinCallClick(true) }, enabled = roomCallState.canStartCall, ) { @@ -81,7 +80,6 @@ private fun StandByCallMenuItem( } } IconButton( - modifier = modifier, onClick = { onJoinCallClick(false) }, enabled = roomCallState.canStartCall, ) { From bad6085fb213b68c69959407f689e5469c2e4f78 Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 6 Mar 2026 12:19:05 +0100 Subject: [PATCH 17/17] review: consistency use isAudioCall everywhere (instead of voiceOnly) --- .../android/features/call/impl/ui/CallScreenPresenter.kt | 2 +- .../android/features/call/impl/utils/CallWidgetProvider.kt | 2 +- .../features/call/impl/utils/DefaultCallWidgetProvider.kt | 4 ++-- .../android/features/call/utils/FakeCallWidgetProvider.kt | 2 +- .../android/features/messages/impl/MessagesFlowNode.kt | 4 ++-- .../element/android/features/messages/impl/MessagesNode.kt | 4 ++-- .../features/messages/impl/threads/ThreadedMessagesNode.kt | 2 +- .../messages/impl/timeline/components/CallMenuItem.kt | 4 ++-- .../impl/timeline/components/TimelineItemCallNotifyView.kt | 2 +- .../matrix/api/widget/CallWidgetSettingsProvider.kt | 2 +- .../matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt | 6 +++--- .../matrix/test/widget/FakeCallWidgetSettingsProvider.kt | 4 ++-- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt index eed4ee7327..da2c57c0ac 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt @@ -226,7 +226,7 @@ class CallScreenPresenter( sessionId = inputs.sessionId, roomId = inputs.roomId, clientId = UUID.randomUUID().toString(), - voiceOnly = inputs.isAudioCall, + isAudioCall = inputs.isAudioCall, languageTag = languageTag, theme = theme, ).getOrThrow() diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt index d4fae4826e..66d7edba72 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/CallWidgetProvider.kt @@ -16,7 +16,7 @@ interface CallWidgetProvider { suspend fun getWidget( sessionId: SessionId, roomId: RoomId, - voiceOnly: Boolean, + isAudioCall: Boolean, clientId: String, languageTag: String?, theme: String?, diff --git a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt index f94a1ecd59..b31b6152d0 100644 --- a/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt +++ b/features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt @@ -32,7 +32,7 @@ class DefaultCallWidgetProvider( override suspend fun getWidget( sessionId: SessionId, roomId: RoomId, - voiceOnly: Boolean, + isAudioCall: Boolean, clientId: String, languageTag: String?, theme: String?, @@ -51,7 +51,7 @@ class DefaultCallWidgetProvider( baseUrl = baseUrl, encrypted = isEncrypted, direct = room.isDm(), - voiceOnly = voiceOnly, + isAudioCall = isAudioCall, hasActiveCall = roomInfo.hasRoomCall, ) val callUrl = room.generateWidgetWebViewUrl( diff --git a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt index a76add7d28..ebc00b0e8f 100644 --- a/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt +++ b/features/call/impl/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt @@ -23,7 +23,7 @@ class FakeCallWidgetProvider( override suspend fun getWidget( sessionId: SessionId, roomId: RoomId, - voiceOnly: Boolean, + isAudioCall: Boolean, clientId: String, languageTag: String?, theme: String? diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index 1d832935ea..8342184b12 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -489,11 +489,11 @@ class MessagesFlowNode( backstack.push(NavTarget.EditPoll(Timeline.Mode.Thread(navTarget.threadRootId), eventId)) } - override fun navigateToRoomCall(roomId: RoomId, voiceOnly: Boolean) { + override fun navigateToRoomCall(roomId: RoomId, isAudioCall: Boolean) { val callType = CallType.RoomCall( sessionId = sessionId, roomId = roomId, - isAudioCall = voiceOnly + isAudioCall = isAudioCall ) analyticsService.captureInteraction(Interaction.Name.MobileRoomCallButton) elementCallEntryPoint.startCall(callType) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index f8529bf005..0c0b3e5448 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -279,8 +279,8 @@ class MessagesNode( }, onSendLocationClick = callback::navigateToSendLocation, onCreatePollClick = callback::navigateToCreatePoll, - onJoinCallClick = { voiceOnly -> - callback.navigateToRoomCall(room.roomId, voiceOnly) + onJoinCallClick = { isAudioCall -> + callback.navigateToRoomCall(room.roomId, isAudioCall) }, onViewAllPinnedMessagesClick = callback::navigateToPinnedMessagesList, modifier = modifier, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt index 6ab9bbc506..2c2b8e5f01 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/threads/ThreadedMessagesNode.kt @@ -130,7 +130,7 @@ class ThreadedMessagesNode( fun navigateToSendLocation() fun navigateToCreatePoll() fun navigateToEditPoll(eventId: EventId) - fun navigateToRoomCall(roomId: RoomId, voiceOnly: Boolean) + fun navigateToRoomCall(roomId: RoomId, isAudioCall: Boolean) fun navigateToThread(threadRootId: ThreadId, focusedEventId: EventId?) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt index a370866f1e..28f5011652 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/CallMenuItem.kt @@ -36,7 +36,7 @@ import io.element.android.libraries.ui.strings.CommonStrings @Composable internal fun CallMenuItem( roomCallState: RoomCallState, - onJoinCallClick: (voiceOnly: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, modifier: Modifier = Modifier, ) { when (roomCallState) { @@ -63,7 +63,7 @@ internal fun CallMenuItem( @Composable private fun StandByCallMenuItem( roomCallState: RoomCallState.StandBy, - onJoinCallClick: (voiceOnly: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, modifier: Modifier = Modifier, ) { Row(modifier = modifier) { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt index 203b4949b0..a6ae2d9ee5 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemCallNotifyView.kt @@ -46,7 +46,7 @@ internal fun TimelineItemCallNotifyView( event: TimelineItem.Event, roomCallState: RoomCallState, onLongClick: (TimelineItem.Event) -> Unit, - onJoinCallClick: (voiceOnly: Boolean) -> Unit, + onJoinCallClick: (isAudioCall: Boolean) -> Unit, modifier: Modifier = Modifier ) { Row( diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt index dd4fa3eb66..d0686e8e5f 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/widget/CallWidgetSettingsProvider.kt @@ -16,7 +16,7 @@ interface CallWidgetSettingsProvider { widgetId: String = UUID.randomUUID().toString(), encrypted: Boolean, direct: Boolean, - voiceOnly: Boolean, + isAudioCall: Boolean, hasActiveCall: Boolean, ): MatrixWidgetSettings } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt index 7cf11d97e0..490e4e3683 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/DefaultCallWidgetSettingsProvider.kt @@ -35,7 +35,7 @@ class DefaultCallWidgetSettingsProvider( widgetId: String, encrypted: Boolean, direct: Boolean, - voiceOnly: Boolean, + isAudioCall: Boolean, hasActiveCall: Boolean ): MatrixWidgetSettings { val isAnalyticsEnabled = analyticsService.userConsentFlow.first() @@ -60,11 +60,11 @@ class DefaultCallWidgetSettingsProvider( // skipLobby = null, intent = when { direct && hasActiveCall -> { - if (voiceOnly) CallIntent.JOIN_EXISTING_DM_VOICE else CallIntent.JOIN_EXISTING_DM + if (isAudioCall) CallIntent.JOIN_EXISTING_DM_VOICE else CallIntent.JOIN_EXISTING_DM } hasActiveCall -> CallIntent.JOIN_EXISTING direct -> { - if (voiceOnly) CallIntent.START_CALL_DM_VOICE else CallIntent.START_CALL_DM + if (isAudioCall) CallIntent.START_CALL_DM_VOICE else CallIntent.START_CALL_DM } else -> CallIntent.START_CALL }.also { diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt index e038415eb3..f33a645b5d 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/widget/FakeCallWidgetSettingsProvider.kt @@ -28,10 +28,10 @@ class FakeCallWidgetSettingsProvider( widgetId: String, encrypted: Boolean, direct: Boolean, - voiceOnly: Boolean, + isAudioCall: Boolean, hasActiveCall: Boolean ): MatrixWidgetSettings { providedBaseUrls += baseUrl - return provideFn(baseUrl, widgetId, encrypted, direct, voiceOnly, hasActiveCall) + return provideFn(baseUrl, widgetId, encrypted, direct, isAudioCall, hasActiveCall) } }