Fix switch camera tooltip showing incorrectly.

This commit is contained in:
Cody Henthorne
2023-12-12 16:42:22 -05:00
parent b646e69b6b
commit 5627bb6bed
2 changed files with 5 additions and 1 deletions

View File

@@ -172,6 +172,10 @@ public class CallParticipantView extends ConstraintLayout {
audioIndicator.setVisibility(View.VISIBLE);
audioIndicator.bind(participant.isMicrophoneEnabled(), participant.getAudioLevel());
if (selfPipMode != SelfPipMode.NOT_SELF_PIP) {
switchCameraIconFrame.setVisibility(participant.isVideoEnabled() ? View.VISIBLE : View.GONE);
}
}
if (participantChanged || !Objects.equals(contactPhoto, participant.getRecipient().getContactPhoto())) {

View File

@@ -351,7 +351,7 @@ public class WebRtcCallViewModel extends ViewModel {
if (SignalStore.tooltips().showCallingSwitchCameraTooltip() &&
canDisplaySwitchCameraTooltipIfNeeded &&
hasEnabledLocalVideo &&
localParticipant.getCameraState().isEnabled() &&
webRtcViewModel.getState() == WebRtcViewModel.State.CALL_CONNECTED &&
!newState.getAllRemoteParticipants().isEmpty()
) {