You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performs two network requests sequentially. First it retrieves recent Android Versions and then it requests the features of the latest version.
55
-
There also exists an alternative implementation for this use case which uses traditional callbacks. It should demonstrate the simplicity of the Coroutine version compared to callback-based version.
54
+
This use case performs two network requests sequentially. First it retrieves recent Android Versions and then it requests the features of the latest version.
55
+
56
+
There are also 2 alternative implementations included. One is using old-school [callbacks](app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/SequentialNetworkRequestsCallbacksViewModel.kt).
57
+
The other one uses [RxJava](app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/rx/SequentialNetworkRequestsRxViewModel.kt). You can compare each implementation.
58
+
If you compare all implementation, it is really interesting to see, in my opinion, how simple the Coroutine-based version actually is.
Copy file name to clipboardexpand all lines: app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/MockApi.kt
Copy file name to clipboardexpand all lines: app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/SequentialNetworkRequestsCallbacksActivity.kt
Copy file name to clipboardexpand all lines: app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/SequentialNetworkRequestsCallbacksViewModel.kt
Copy file name to clipboardexpand all lines: app/src/main/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/UiState.kt
Copy file name to clipboardexpand all lines: app/src/test/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/FakeFeaturesErrorApi.kt
Copy file name to clipboardexpand all lines: app/src/test/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/FakeSuccessApi.kt
Copy file name to clipboardexpand all lines: app/src/test/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/FakeVersionsErrorApi.kt
Copy file name to clipboardexpand all lines: app/src/test/java/com/lukaslechner/coroutineusecasesonandroid/usecases/coroutines/usecase2/callbacks/SequentialNetworkRequestsCallbacksViewModelTest.kt
0 commit comments