Skip to content

Commit

Permalink
Fix sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
zeropercenthappy committed Jan 7, 2020
1 parent b32e114 commit 05026c4
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import com.yanzhenjie.album.Album
import com.zeropercenthappy.okhttploginterceptor.OkHttpLogInterceptor
import com.zeropercenthappy.retrofitutil.RequestBodyBuilder
import com.zeropercenthappy.retrofitutil.RetrofitBuilder
import com.zeropercenthappy.retrofitutil.call_adapter.coroutine_call_adapter.CoroutineCallAdapterFactory
import com.zeropercenthappy.retrofitutil.converter.string_converter.StringConverterFactory
import com.zeropercenthappy.retrofitutilsample.api.IKalleApi
import com.zeropercenthappy.retrofitutilsample.api.KalleUrl
import com.zeropercenthappy.retrofitutilsample.pojo.*
Expand All @@ -27,6 +25,7 @@ import org.jetbrains.anko.info
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import retrofit2.converter.gson.GsonConverterFactory
import java.io.File
import java.util.*

Expand All @@ -45,8 +44,7 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
.addInterceptor(OkHttpLogInterceptor())
.baseUrl(KalleUrl.BASE_URL)
.addParams(extraTestParamMap)
.addCallAdapterFactory(CoroutineCallAdapterFactory())
.addConverterFactory(StringConverterFactory())
.addConverterFactory(GsonConverterFactory.create())
.build(this)
kalleApi = retrofit.create(IKalleApi::class.java)

Expand Down Expand Up @@ -151,6 +149,7 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
val tempRetrofit = RetrofitBuilder()
.addInterceptor(OkHttpLogInterceptor())
.baseUrl(KalleUrl.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build(this@MainActivity)
val tempKalleApi = tempRetrofit.create(IKalleApi::class.java)
//progress
Expand Down Expand Up @@ -289,5 +288,4 @@ class MainActivity : AppCompatActivity(), AnkoLogger {
}
})
}

}

0 comments on commit 05026c4

Please sign in to comment.