fixes
This commit is contained in:
parent
368b90ddc8
commit
bfaf668191
|
|
@ -78,7 +78,7 @@ open class GeneralDataLoadingViewModel<ResultType>: BaseViewModel {
|
|||
}
|
||||
|
||||
/// Manually update loading state.
|
||||
/// Should only be used only in specific situations on your own risk!
|
||||
/// Should be used only in specific situations on your own risk!
|
||||
///
|
||||
/// - Parameter newState: New loading state.
|
||||
public func updateStateManually(to newState: LoadingState) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
import UIKit
|
||||
|
||||
/// For internal use only!
|
||||
final class TextWithButtonPlaceholder: UIView {
|
||||
|
||||
typealias TapHandler = () -> Void
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ public extension GeneralDataLoadingController where Self: UIViewController {
|
|||
|
||||
// MARK: - GeneralDataLoadingController default implementation
|
||||
|
||||
/// Call this method in viewDidLoad instead of initialLoadView.
|
||||
func initialLoadDataLoadingView() {
|
||||
addViews()
|
||||
setAppearance()
|
||||
|
|
@ -60,8 +59,8 @@ public extension GeneralDataLoadingController where Self: UIViewController {
|
|||
switch value {
|
||||
case .loading:
|
||||
base.onLoadingState()
|
||||
case .result:
|
||||
base.onResultsState()
|
||||
case .result(let newResult, _):
|
||||
base.onResultsState(result: newResult)
|
||||
case .empty:
|
||||
base.onEmptyState()
|
||||
case .error(let error):
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public protocol GeneralDataLoadingController: class, ConfigurableController
|
|||
func onLoadingState()
|
||||
|
||||
/// Called when data loading has finished with non-empty result.
|
||||
func onResultsState()
|
||||
func onResultsState(result: ViewModelResultType)
|
||||
|
||||
/// Called when data loading did finished with empty result.
|
||||
func onEmptyState()
|
||||
|
|
|
|||
Loading…
Reference in New Issue