-
-
Save skydoves/601274f0cdb2f01928f75fd91909defe to your computer and use it in GitHub Desktop.
network_result_call_adapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetworkResultCallAdapter( | |
private val resultType: Type | |
) : CallAdapter<Type, Call<NetworkResult<Type>>> { | |
override fun responseType(): Type = resultType | |
override fun adapt(call: Call<Type>): Call<NetworkResult<Type>> { | |
return NetworkResultCall(call) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment