For coreexample we do not want to support by default the api connection fallback, so the provider is set to null.
This commit is contained in:
parent
d2da1c1014
commit
75024be4bb
|
@ -29,7 +29,7 @@ plugins {
|
|||
}
|
||||
|
||||
android(
|
||||
version = Version(1, 18, 3),
|
||||
version = Version(1, 18, 4),
|
||||
useViewBinding = true
|
||||
)
|
||||
{
|
||||
|
|
|
@ -109,7 +109,7 @@ class NetworkModule {
|
|||
humanVerificationProvider: HumanVerificationProvider,
|
||||
humanVerificationListener: HumanVerificationListener,
|
||||
extraHeaderProvider: ExtraHeaderProvider,
|
||||
apiConnectionListener: ApiConnectionListener
|
||||
apiConnectionListener: ApiConnectionListener? = null
|
||||
): ApiManagerFactory = ApiManagerFactory(
|
||||
Constants.BASE_URL,
|
||||
apiClient,
|
||||
|
@ -141,16 +141,7 @@ class NetworkModule {
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideGuestHoleFallbackListener(): ApiConnectionListener = object: ApiConnectionListener {
|
||||
override suspend fun <T> onPotentiallyBlocked(
|
||||
path: String?,
|
||||
query: String?,
|
||||
backendCall: suspend () -> ApiResult<T>
|
||||
): ApiResult<T>? {
|
||||
delay(1000)
|
||||
return backendCall()
|
||||
}
|
||||
}
|
||||
fun provideApiConnectionListener(): ApiConnectionListener? = null
|
||||
}
|
||||
|
||||
@Module
|
||||
|
|
Loading…
Reference in New Issue