mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-01 06:07:37 +00:00
Split remote user check for group vs individual calls.
This commit is contained in:
committed by
Greyson Parrelli
parent
3c086f347e
commit
d6be14a95f
@@ -320,7 +320,7 @@ public class WebRtcCallViewModel extends ViewModel {
|
||||
webRtcViewModel.isRemoteVideoEnabled(),
|
||||
webRtcViewModel.isRemoteVideoOffer(),
|
||||
localParticipant.isMoreThanOneCameraAvailable(),
|
||||
webRtcViewModel.getRemoteDevicesCount().orElse(0L) > 0,
|
||||
webRtcViewModel.hasAtLeastOneRemote(),
|
||||
webRtcViewModel.getActiveDevice(),
|
||||
webRtcViewModel.getAvailableDevices(),
|
||||
webRtcViewModel.getRemoteDevicesCount().orElse(0),
|
||||
|
||||
@@ -8,6 +8,7 @@ import androidx.annotation.Px;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager;
|
||||
|
||||
|
||||
@@ -105,6 +105,13 @@ class WebRtcViewModel(state: WebRtcServiceState) {
|
||||
val isCallLink: Boolean = state.callInfoState.callRecipient.isCallLink
|
||||
val callLinkDisconnectReason: CallLinkDisconnectReason? = state.callInfoState.callLinkDisconnectReason
|
||||
|
||||
@get:JvmName("hasAtLeastOneRemote")
|
||||
val hasAtLeastOneRemote = if (state.callInfoState.callRecipient.isIndividual) {
|
||||
remoteParticipants.isNotEmpty()
|
||||
} else {
|
||||
remoteDevicesCount.orElse(0L) > 0L
|
||||
}
|
||||
|
||||
@get:JvmName("shouldRingGroup")
|
||||
val ringGroup: Boolean = state.getCallSetupState(state.callInfoState.activePeer?.callId).ringGroup
|
||||
val ringerRecipient: Recipient = state.getCallSetupState(state.callInfoState.activePeer?.callId).ringerRecipient
|
||||
|
||||
Reference in New Issue
Block a user