Skip to content

Commit

Permalink
Error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine van der Lee committed Nov 21, 2016
1 parent 262235d commit 43ce8dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/ALDataRequestView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public class ALDataRequestView: UIView {

/// This will remove all views added
private func resetToPossibleState(completion: ((Bool) -> Void)?){
UIView.animate(withDuration: dataSource?.hideAnimationDurationForDataRequestView(dataRequestView: self) ?? 0, animations: { [weak self] in ()
UIView.animate(withDuration: dataSource?.hideAnimationDuration(for: self) ?? 0, animations: { [weak self] in ()
self?.loadingView?.alpha = 0
self?.emptyView?.alpha = 0
self?.reloadView?.alpha = 0
Expand Down Expand Up @@ -184,7 +184,7 @@ public class ALDataRequestView: UIView {
layoutIfNeeded()
}

dataSourceLoadingView.showWithDuration(duration: dataSource?.showAnimationDurationForDataRequestView(dataRequestView: self))
dataSourceLoadingView.showWithDuration(duration: dataSource?.showAnimationDuration(for: self))
}

/// This will show the reload view
Expand Down Expand Up @@ -216,7 +216,7 @@ public class ALDataRequestView: UIView {
dataSourceReloadType.setup(for: ReloadType(reason: reloadReason, error: error))
dataSourceReloadType.retryButton.addTarget(self, action: #selector(ALDataRequestView.retryButtonTapped), for: UIControlEvents.touchUpInside)

reloadView.showWithDuration(duration: dataSource?.showAnimationDurationForDataRequestView(dataRequestView: self))
reloadView.showWithDuration(duration: dataSource?.showAnimationDuration(for: self))
}

/// This will show the empty view
Expand All @@ -232,7 +232,7 @@ public class ALDataRequestView: UIView {
addSubview(emptyView!)
emptyView?.autoPinEdgesToSuperviewEdges()

dataSourceEmptyView.showWithDuration(duration: dataSource?.showAnimationDurationForDataRequestView(dataRequestView: self))
dataSourceEmptyView.showWithDuration(duration: dataSource?.showAnimationDuration(for: self))
}

/// IBAction for the retry button
Expand Down

0 comments on commit 43ce8dc

Please sign in to comment.