Move joinState from IndivCall to SignalCall
This commit is contained in:
parent
0ce8a37dfe
commit
1581795cbc
@ -194,34 +194,6 @@ public class IndividualCall: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
/// `JoinState` is a group call concept, but we want to bridge
|
||||
/// between the two call types.
|
||||
/// TODO: Continue to tweak this as we unify the individual and
|
||||
/// group call UIs.
|
||||
var joinState: JoinState {
|
||||
switch self.state {
|
||||
case .idle,
|
||||
.remoteHangup,
|
||||
.remoteHangupNeedPermission,
|
||||
.localHangup,
|
||||
.remoteRinging,
|
||||
.localRinging_Anticipatory,
|
||||
.localRinging_ReadyToAnswer,
|
||||
.remoteBusy,
|
||||
.localFailure,
|
||||
.busyElsewhere,
|
||||
.answeredElsewhere,
|
||||
.declinedElsewhere:
|
||||
return .notJoined
|
||||
case .connected,
|
||||
.accepting,
|
||||
.answering,
|
||||
.reconnecting,
|
||||
.dialing:
|
||||
return .joined
|
||||
}
|
||||
}
|
||||
|
||||
public var offerMediaType: TSRecentCallOfferType = .audio
|
||||
|
||||
// We start out muted if the record permission isn't granted. This should generally
|
||||
|
||||
@ -128,7 +128,32 @@ public class SignalCall: NSObject, CallManagerCallReference {
|
||||
|
||||
public var joinState: JoinState {
|
||||
switch mode {
|
||||
case .individual(let call): return call.joinState
|
||||
case .individual(let call):
|
||||
/// `JoinState` is a group call concept, but we want to bridge
|
||||
/// between the two call types.
|
||||
/// TODO: Continue to tweak this as we unify the individual and
|
||||
/// group call UIs.
|
||||
switch call.state {
|
||||
case .idle,
|
||||
.remoteHangup,
|
||||
.remoteHangupNeedPermission,
|
||||
.localHangup,
|
||||
.remoteRinging,
|
||||
.localRinging_Anticipatory,
|
||||
.localRinging_ReadyToAnswer,
|
||||
.remoteBusy,
|
||||
.localFailure,
|
||||
.busyElsewhere,
|
||||
.answeredElsewhere,
|
||||
.declinedElsewhere:
|
||||
return .notJoined
|
||||
case .connected,
|
||||
.accepting,
|
||||
.answering,
|
||||
.reconnecting,
|
||||
.dialing:
|
||||
return .joined
|
||||
}
|
||||
case .group(let call): return call.localDeviceState.joinState
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user