diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2022-12-03 19:42:02 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2022-12-03 19:42:02 +0000 |
commit | 57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4 (patch) | |
tree | bb004a8a3c1b7b376ffab8f910a49196d376c09e /app/src/main | |
parent | 605129517ec811deb416f1bebecca6391e743cb7 (diff) | |
download | infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar.gz infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar.bz2 infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar.lz infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar.xz infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.tar.zst infinity-for-reddit-57985ed95ad0cb05d72c49a8d2c8bf5a2861b0e4.zip |
Fix a stupid bug that prevents posts from loading.
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java index 62bf7471..6abe4832 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkModule.java @@ -9,6 +9,7 @@ import javax.inject.Singleton; import dagger.Module; import dagger.Provides; +import ml.docilealligator.infinityforreddit.network.SortTypeConverterFactory; import ml.docilealligator.infinityforreddit.utils.APIUtils; import okhttp3.ConnectionPool; import okhttp3.Interceptor; @@ -37,6 +38,7 @@ abstract class NetworkModule { .baseUrl(APIUtils.API_BASE_URI) .client(okHttpClient) .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(SortTypeConverterFactory.create()) .addCallAdapterFactory(GuavaCallAdapterFactory.create()) .build(); } @@ -49,15 +51,15 @@ abstract class NetworkModule { @Provides @Named("no_oauth") static Retrofit provideRetrofit(Retrofit retrofit) { - return retrofit.newBuilder() - .baseUrl(APIUtils.OAUTH_API_BASE_URI) - .build(); + return retrofit; } @Provides @Named("oauth") - static Retrofit providesOAuthetrofit(Retrofit retrofit) { - return retrofit; + static Retrofit providesOAuthRetrofit(Retrofit retrofit) { + return retrofit.newBuilder() + .baseUrl(APIUtils.OAUTH_API_BASE_URI) + .build(); } @Provides |