mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
Private and typo
This commit is contained in:
parent
ab2a55d417
commit
236f7f8e28
1 changed files with 7 additions and 7 deletions
|
@ -91,23 +91,23 @@ class VectorCallViewModel @AssistedInject constructor(
|
||||||
val proximityManager: CallProximityManager
|
val proximityManager: CallProximityManager
|
||||||
) : VectorViewModel<VectorCallViewState, VectorCallViewActions, VectorCallViewEvents>(initialState) {
|
) : VectorViewModel<VectorCallViewState, VectorCallViewActions, VectorCallViewEvents>(initialState) {
|
||||||
|
|
||||||
var call: MxCall? = null
|
private var call: MxCall? = null
|
||||||
|
|
||||||
var connectionTimoutTimer: Timer? = null
|
private var connectionTimeoutTimer: Timer? = null
|
||||||
var hasBeenConnectedOnce = false
|
private var hasBeenConnectedOnce = false
|
||||||
|
|
||||||
private val callStateListener = object : MxCall.StateListener {
|
private val callStateListener = object : MxCall.StateListener {
|
||||||
override fun onStateUpdate(call: MxCall) {
|
override fun onStateUpdate(call: MxCall) {
|
||||||
val callState = call.state
|
val callState = call.state
|
||||||
if (callState is CallState.Connected && callState.iceConnectionState == PeerConnection.PeerConnectionState.CONNECTED) {
|
if (callState is CallState.Connected && callState.iceConnectionState == PeerConnection.PeerConnectionState.CONNECTED) {
|
||||||
hasBeenConnectedOnce = true
|
hasBeenConnectedOnce = true
|
||||||
connectionTimoutTimer?.cancel()
|
connectionTimeoutTimer?.cancel()
|
||||||
connectionTimoutTimer = null
|
connectionTimeoutTimer = null
|
||||||
} else {
|
} else {
|
||||||
// do we reset as long as it's moving?
|
// do we reset as long as it's moving?
|
||||||
connectionTimoutTimer?.cancel()
|
connectionTimeoutTimer?.cancel()
|
||||||
if (hasBeenConnectedOnce) {
|
if (hasBeenConnectedOnce) {
|
||||||
connectionTimoutTimer = Timer().apply {
|
connectionTimeoutTimer = Timer().apply {
|
||||||
schedule(object : TimerTask() {
|
schedule(object : TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
session.callSignalingService().getTurnServer(object : MatrixCallback<TurnServerResponse> {
|
session.callSignalingService().getTurnServer(object : MatrixCallback<TurnServerResponse> {
|
||||||
|
|
Loading…
Reference in a new issue