[MM-69735] Improve DM call user experience - #10017
Conversation
|
/update-branch |
|
Error trying to update the PR. |
|
/update-branch |
|
Error trying to update the PR. |
Coverage Comparison Report |
|
/update-branch |
|
Error trying to update the PR. |
f9a7650 to
af3870a
Compare
|
/update-branch |
|
Error trying to update the PR. |
…tiation and hide "People" button in 1:1 DM Call (#10031)
Callkit does not allow to request a permission in the lock screen, we should probably request the permission when the user uses the app and we detect that the server has calls installed proactively and not on first use |
Thanks @enahum. I wondered about that. It think what you'e proposed makes sense. |
|
can you clarify this
|
Sure @M-ZubairAhmed. For the DM context, I was thinking that we could/should remove the 'No one is talking' state altogether. So when no one is actively speaking, we just show the avatar and name of the user you're on the call with. Like this:
If this is non-trivial, let me know. We could descope this for now if that's the case. Now that I think of it, we did not implement this in the webapp changes, so maybe it makes sense to defer this for now. |
enahum
left a comment
There was a problem hiding this comment.
One more question: is it expected that joining a call takes me to the channel screen?
| import React, {forwardRef} from 'react'; | ||
| import Animated, {useAnimatedStyle, useDerivedValue, type SharedValue} from 'react-native-reanimated'; | ||
|
|
||
| import {type NavigationButtonProps} from '@components/navigation_button'; |
There was a problem hiding this comment.
Nit: I see no reason for this change
| import {View} from 'react-native'; | ||
|
|
||
| import CompassIcon from '@components/compass_icon'; | ||
| import {type NavigationButtonProps} from '@components/navigation_button'; |
| speakingUserStyle: StyleProp<TextStyle>; | ||
| speakingPostfixStyle: StyleProp<TextStyle>; |
There was a problem hiding this comment.
Why are we passing the styles as props and not defining them in the component?
| distinctUntilChanged(), | ||
| ); | ||
|
|
||
| // TODO: Remove startTime fallback |
| setIncomingCalls({...getIncomingCalls(), currentRingingCallId: undefined}); | ||
| // The incoming ring and the outbound ringback share the one native player, so stop | ||
| // whichever is playing through its own owner | ||
| stopRingback(); |
There was a problem hiding this comment.
So I place a call, send the app to the background, no ring back on my call?
There was a problem hiding this comment.
I think this was defensive to prevent using the player which might be needed for ringtone. But, now that ringtones on iOS are always handled by CallKit, we can skip stopRingback on iOS and allow ringback tone in background.
There was a problem hiding this comment.
If the app is still attempting to connect while backgrounded, then we should keep the outbound sound ringing.
|
|
||
| const enabled = user.notifyProps?.calls_mobile_sound ? user.notifyProps.calls_mobile_sound === 'true' : user.notifyProps?.calls_desktop_sound === 'true'; | ||
| if (!enabled) { | ||
| // No user shouldn't happen, so don't bother localizing and displaying an alert. |
There was a problem hiding this comment.
I don't understand this comment
| const {database} = DatabaseManager.getServerDatabaseAndOperator(serverUrl); | ||
| const channel = await getChannelById(database, channelId); | ||
| if (!getDMCalleeId(currentCall.myUserId, channel)) { | ||
| logDebug('startRingbackIfNeeded skipped: not a 1:1 DM with someone else'); |
There was a problem hiding this comment.
So for every non DM we get this log? Needed?
| nextCurrentCall.mySessionId = sessionId; | ||
| } | ||
|
|
||
| // TODO: Since this is a synchronous event path, we should only set dmCalleeAnsweredAt for DM calls. |
| /// registration failed and `didDeactivate` will never fire, this is the only | ||
| /// teardown path. | ||
| @objc public func resetSession() { | ||
| rtcSession.lockForConfiguration() |
There was a problem hiding this comment.
RTCAudioSession requires the configuration lock for its mutating calls
…e type imports for NavigationButtonProps
Added identifiers to test cases for the DM call button to improve traceability. The tests now include specific references to the associated ticket (MM-70370) for better tracking of changes related to the call button's visibility in different channel types.
Updated the CallStatusText component to utilize theme-based styles for speaking user and postfix text, improving consistency and maintainability. Removed unnecessary style props and integrated the styles directly within the component. Additionally, cleaned up imports in the current call bar and header components for better organization.
Removed outdated TODO comments regarding startTime fallback and DM call handling. Updated comments for clarity on user presence checks and the handling of dmCalleeAnsweredAt, ensuring consistency across call types. This enhances code readability and maintains focus on the intended functionality.
|
/update-branch |
Yes thats for DM calls only |
If that is the case, two follow up questions: Does this work when answering the call through Callkit, with and without the phone locked , is it also expected to be taken to the call screen for DM's when I return to the app when it was sitting in the background with an active call? |
On iOS, CallKit owns the inbound ringtone and never uses the native audio player, so there is no shared-player conflict that would justify stopping ringback when the app backgrounds. Only stop ringback on background on Android, where inbound ring and ringback do share the one native MediaPlayer.

Summary
Ticket Link
Checklist
E2E/Run(orE2E/Run-iOS/E2E/Run-Androidfor platform-specific runs).Device Information
This PR was tested on:
Screenshots
Release Note