From 68ed718aa0bbafe1a1f1352ceb390aeb959fec91 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 4 Dec 2022 19:17:05 +1100 Subject: Version v5.4.0-beta1. Add authenticator to oauth retrofit. --- .../docilealligator/infinityforreddit/NetworkModule.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'app') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java index 6abe4832..bed19e97 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java @@ -56,9 +56,10 @@ abstract class NetworkModule { @Provides @Named("oauth") - static Retrofit providesOAuthRetrofit(Retrofit retrofit) { + static Retrofit providesOAuthRetrofit(Retrofit retrofit, @Named("default") OkHttpClient okHttpClient) { return retrofit.newBuilder() .baseUrl(APIUtils.OAUTH_API_BASE_URI) + .client(okHttpClient) .build(); } @@ -192,17 +193,6 @@ abstract class NetworkModule { .build(); } - @Provides - @Named("strapi") - @Singleton - static Retrofit providestrapiRetrofit(@Named("default") OkHttpClient okHttpClient, - Retrofit retrofit) { - return retrofit.newBuilder() - .baseUrl(APIUtils.STRAPI_BASE_URI) - .client(okHttpClient) - .build(); - } - @Provides @Named("streamable") @Singleton -- cgit v1.2.3