mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Fix a stupid bug that prevents posts from loading.
This commit is contained in:
parent
605129517e
commit
57985ed95a
@ -9,6 +9,7 @@ import javax.inject.Singleton;
|
|||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
import ml.docilealligator.infinityforreddit.network.SortTypeConverterFactory;
|
||||||
import ml.docilealligator.infinityforreddit.utils.APIUtils;
|
import ml.docilealligator.infinityforreddit.utils.APIUtils;
|
||||||
import okhttp3.ConnectionPool;
|
import okhttp3.ConnectionPool;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
@ -37,6 +38,7 @@ abstract class NetworkModule {
|
|||||||
.baseUrl(APIUtils.API_BASE_URI)
|
.baseUrl(APIUtils.API_BASE_URI)
|
||||||
.client(okHttpClient)
|
.client(okHttpClient)
|
||||||
.addConverterFactory(ScalarsConverterFactory.create())
|
.addConverterFactory(ScalarsConverterFactory.create())
|
||||||
|
.addConverterFactory(SortTypeConverterFactory.create())
|
||||||
.addCallAdapterFactory(GuavaCallAdapterFactory.create())
|
.addCallAdapterFactory(GuavaCallAdapterFactory.create())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@ -49,15 +51,15 @@ abstract class NetworkModule {
|
|||||||
@Provides
|
@Provides
|
||||||
@Named("no_oauth")
|
@Named("no_oauth")
|
||||||
static Retrofit provideRetrofit(Retrofit retrofit) {
|
static Retrofit provideRetrofit(Retrofit retrofit) {
|
||||||
return retrofit.newBuilder()
|
return retrofit;
|
||||||
.baseUrl(APIUtils.OAUTH_API_BASE_URI)
|
|
||||||
.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Named("oauth")
|
@Named("oauth")
|
||||||
static Retrofit providesOAuthetrofit(Retrofit retrofit) {
|
static Retrofit providesOAuthRetrofit(Retrofit retrofit) {
|
||||||
return retrofit;
|
return retrofit.newBuilder()
|
||||||
|
.baseUrl(APIUtils.OAUTH_API_BASE_URI)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
Loading…
Reference in New Issue
Block a user