Set a custom request config for the Client (#5266)
This is the default HTTP request configuration that will be used. I matches iOS.
This commit is contained in:
parent
db921ab108
commit
83c72f4c05
1 changed files with 8 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.rustcomponents.sdk.Client
|
||||
import org.matrix.rustcomponents.sdk.ClientBuilder
|
||||
import org.matrix.rustcomponents.sdk.RequestConfig
|
||||
import org.matrix.rustcomponents.sdk.Session
|
||||
import org.matrix.rustcomponents.sdk.SlidingSyncVersion
|
||||
import org.matrix.rustcomponents.sdk.SlidingSyncVersionBuilder
|
||||
|
|
@ -133,6 +134,13 @@ class RustMatrixClientFactory @Inject constructor(
|
|||
)
|
||||
.enableShareHistoryOnInvite(featureFlagService.isFeatureEnabled(FeatureFlags.EnableKeyShareOnInvite))
|
||||
.threadsEnabled(featureFlagService.isFeatureEnabled(FeatureFlags.Threads), threadSubscriptions = false)
|
||||
.requestConfig(RequestConfig(
|
||||
timeout = 30_000uL,
|
||||
retryLimit = 0u,
|
||||
// Use default values for the rest
|
||||
maxConcurrentRequests = null,
|
||||
maxRetryTime = null,
|
||||
))
|
||||
.run {
|
||||
// Apply sliding sync version settings
|
||||
when (slidingSyncType) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue