提交 0c6f5b20 编写于 作者: J JessYan

Improve ClientModule

上级 534ad741
......@@ -152,7 +152,8 @@ public abstract class ClientModule {
*/
@Singleton
@Provides
static RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration, @Named("RxCacheDirectory") File cacheDirectory) {
static RxCache provideRxCache(Application application, @Nullable RxCacheConfiguration configuration
, @Named("RxCacheDirectory") File cacheDirectory, Gson gson) {
RxCache.Builder builder = new RxCache.Builder();
RxCache rxCache = null;
if (configuration != null) {
......@@ -160,7 +161,7 @@ public abstract class ClientModule {
}
if (rxCache != null) return rxCache;
return builder
.persistence(cacheDirectory, new GsonSpeaker());
.persistence(cacheDirectory, new GsonSpeaker(gson));
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册