Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
avently committed Jan 31, 2024
1 parent e543f61 commit b1e76c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,15 +591,15 @@ fun PreviewActiveCallOverlayVideo() {
ActiveCallOverlayLayout(
call = Call(
remoteHostId = null,
user = User.sampleData,
contact = Contact.sampleData,
callState = CallState.Negotiated,
localMedia = CallMediaType.Video,
peerMedia = CallMediaType.Video,
connectionInfo = ConnectionInfo(
RTCIceCandidate(RTCIceCandidateType.Host, "tcp"),
RTCIceCandidate(RTCIceCandidateType.Host, "tcp")
),
user = User.sampleData
)
),
speakerCanBeEnabled = true,
dismiss = {},
Expand All @@ -618,15 +618,15 @@ fun PreviewActiveCallOverlayAudio() {
ActiveCallOverlayLayout(
call = Call(
remoteHostId = null,
user = User.sampleData,
contact = Contact.sampleData,
callState = CallState.Negotiated,
localMedia = CallMediaType.Audio,
peerMedia = CallMediaType.Audio,
connectionInfo = ConnectionInfo(
RTCIceCandidate(RTCIceCandidateType.Host, "udp"),
RTCIceCandidate(RTCIceCandidateType.Host, "udp")
),
user = User.sampleData
)
),
speakerCanBeEnabled = true,
dismiss = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class CallManager(val chatModel: ChatModel) {
with (chatModel) {
activeCall.value = Call(
remoteHostId = invitation.remoteHostId,
user = currentUser.value ?: return,
contact = invitation.contact,
callState = CallState.InvitationAccepted,
localMedia = invitation.callType.media,
sharedKey = invitation.sharedKey,
user = currentUser.value ?: return
)
showCallView.value = true
val useRelay = controller.appPrefs.webrtcPolicyRelay.get()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import kotlin.collections.ArrayList

data class Call(
val remoteHostId: Long?,
val user: User,
val contact: Contact,
val callState: CallState,
val localMedia: CallMediaType,
Expand All @@ -24,7 +25,6 @@ data class Call(
var localCamera: VideoCamera = VideoCamera.User,
val connectionInfo: ConnectionInfo? = null,
var connectedAt: Instant? = null,
val user: User,
) {
val encrypted: Boolean get() = localEncrypted && sharedKey != null
val localEncrypted: Boolean get() = localCapabilities?.encryption ?: false
Expand Down

0 comments on commit b1e76c1

Please sign in to comment.