From bfaf66819100be05551bd3e576e307e01670a0c4 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Thu, 22 Mar 2018 18:27:47 +0300 Subject: [PATCH] fixes --- .../GeneralDataLoading/GeneralDataLoadingViewModel.swift | 2 +- .../DefaultPlaceholders/TextWithButtonPlaceholder.swift | 1 + .../GeneralDataLoadingController+DefaultImplementation.swift | 5 ++--- .../GeneralDataLoading/GeneralDataLoadingController.swift | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Classes/DataLoading/GeneralDataLoading/GeneralDataLoadingViewModel.swift b/Sources/Classes/DataLoading/GeneralDataLoading/GeneralDataLoadingViewModel.swift index 25bfa80f..6b298752 100644 --- a/Sources/Classes/DataLoading/GeneralDataLoading/GeneralDataLoadingViewModel.swift +++ b/Sources/Classes/DataLoading/GeneralDataLoading/GeneralDataLoadingViewModel.swift @@ -78,7 +78,7 @@ open class GeneralDataLoadingViewModel: 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) { diff --git a/Sources/Classes/Views/DefaultPlaceholders/TextWithButtonPlaceholder.swift b/Sources/Classes/Views/DefaultPlaceholders/TextWithButtonPlaceholder.swift index 2f93134a..e74874cc 100644 --- a/Sources/Classes/Views/DefaultPlaceholders/TextWithButtonPlaceholder.swift +++ b/Sources/Classes/Views/DefaultPlaceholders/TextWithButtonPlaceholder.swift @@ -22,6 +22,7 @@ import UIKit +/// For internal use only! final class TextWithButtonPlaceholder: UIView { typealias TapHandler = () -> Void diff --git a/Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift b/Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift index 74ccba65..f8c9f4e0 100644 --- a/Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift +++ b/Sources/Extensions/DataLoading/GeneralDataLoading/GeneralDataLoadingController+DefaultImplementation.swift @@ -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): diff --git a/Sources/Protocols/DataLoading/GeneralDataLoading/GeneralDataLoadingController.swift b/Sources/Protocols/DataLoading/GeneralDataLoading/GeneralDataLoadingController.swift index b15de5d8..fdf48f87 100644 --- a/Sources/Protocols/DataLoading/GeneralDataLoading/GeneralDataLoadingController.swift +++ b/Sources/Protocols/DataLoading/GeneralDataLoading/GeneralDataLoadingController.swift @@ -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()