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(
|
android(
|
||||||
version = Version(1, 18, 3),
|
version = Version(1, 18, 4),
|
||||||
useViewBinding = true
|
useViewBinding = true
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@ class NetworkModule {
|
||||||
humanVerificationProvider: HumanVerificationProvider,
|
humanVerificationProvider: HumanVerificationProvider,
|
||||||
humanVerificationListener: HumanVerificationListener,
|
humanVerificationListener: HumanVerificationListener,
|
||||||
extraHeaderProvider: ExtraHeaderProvider,
|
extraHeaderProvider: ExtraHeaderProvider,
|
||||||
apiConnectionListener: ApiConnectionListener
|
apiConnectionListener: ApiConnectionListener? = null
|
||||||
): ApiManagerFactory = ApiManagerFactory(
|
): ApiManagerFactory = ApiManagerFactory(
|
||||||
Constants.BASE_URL,
|
Constants.BASE_URL,
|
||||||
apiClient,
|
apiClient,
|
||||||
|
@ -141,16 +141,7 @@ class NetworkModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideGuestHoleFallbackListener(): ApiConnectionListener = object: ApiConnectionListener {
|
fun provideApiConnectionListener(): ApiConnectionListener? = null
|
||||||
override suspend fun <T> onPotentiallyBlocked(
|
|
||||||
path: String?,
|
|
||||||
query: String?,
|
|
||||||
backendCall: suspend () -> ApiResult<T>
|
|
||||||
): ApiResult<T>? {
|
|
||||||
delay(1000)
|
|
||||||
return backendCall()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
|
|
Loading…
Reference in New Issue