Skip to content

Commit

Permalink
Merge branch 'develop' into upgrade_to_api_34
Browse files Browse the repository at this point in the history
  • Loading branch information
ohassine authored Sep 21, 2023
2 parents 1366f3c + 58639ea commit eca01b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@ class ProteusClientProviderImpl(

override suspend fun getOrError(): Either<CoreFailure, ProteusClient> {
return mutex.withLock {
_proteusClient?.let { Either.Right(it) } ?: run {
if (FileUtil.isDirectoryNonEmpty(rootProteusPath)) {
wrapProteusRequest {
createProteusClient().also {
_proteusClient = it
withContext(dispatcher.io) {
_proteusClient?.let { Either.Right(it) } ?: run {
if (FileUtil.isDirectoryNonEmpty(rootProteusPath)) {
wrapProteusRequest {
createProteusClient().also {
_proteusClient = it
}
}
} else {
Either.Left(CoreFailure.MissingClientRegistration)
}
} else {
Either.Left(CoreFailure.MissingClientRegistration)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.wire.kalium.util.KaliumDispatcherImpl
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.withContext

/**
* This use case is responsible for answering a call.
Expand Down Expand Up @@ -66,10 +67,11 @@ internal class AnswerCallUseCaseImpl(
unMuteCall(conversationId)
}
}

callManager.value.answerCall(
conversationId = conversationId,
isAudioCbr = kaliumConfigs.forceConstantBitrateCalls
)
withContext(dispatchers.default) {
callManager.value.answerCall(
conversationId = conversationId,
isAudioCbr = kaliumConfigs.forceConstantBitrateCalls
)
}
}
}

0 comments on commit eca01b0

Please sign in to comment.