NetworkOperationState and RequestNetworkOperationModel for tracking network request state. Just like GeneralDataLoadingState but without empty state.

This commit is contained in:
2018-05-18 18:52:40 +03:00
parent 4c6990883a
commit d600d57260
18 changed files with 445 additions and 93 deletions
@@ -22,5 +22,6 @@
import RxSwift
/// Data loading model for GeneralDataLoadingState with Single as data source.
public final class GeneralDataLoadingModel<T>: RxDataLoadingModel<GeneralDataLoadingState<Single<T>>> {
}
@@ -64,7 +64,7 @@ open class GeneralDataLoadingViewModel<ResultType>: BaseViewModel {
/// Returns current result if it exists.
public var currentResult: ResultType? {
return currentLoadingState.currentResult
return currentLoadingState.result
}
/// Current state of loading process.