Fix indentation

This commit is contained in:
Ivan Zinovyev 2019-01-22 03:16:40 +03:00
parent ff18a4d8b8
commit f8f2ca6852
1 changed files with 7 additions and 7 deletions

View File

@ -58,9 +58,9 @@ extension Expandable where Self: UITableViewCell & ConfigurableCell {
animationDuration: TimeInterval = .defaultExpandableAnimationDuration) {
guard let tableView = tableView,
let viewModel = viewModel,
let viewModel = viewModel,
viewModel.expandableState != state else {
return
return
}
let contentOffset = tableView.contentOffset
@ -68,9 +68,9 @@ extension Expandable where Self: UITableViewCell & ConfigurableCell {
if animated {
UIView.animate(withDuration: animationDuration,
animations: { [weak self] in
self?.applyChanges(expandableState: state)
}, completion: { _ in
viewModel.expandableState = state
self?.applyChanges(expandableState: state)
}, completion: { _ in
viewModel.expandableState = state
})
} else {
applyChanges(expandableState: state)
@ -87,8 +87,8 @@ extension Expandable where Self: UITableViewCell & ConfigurableCell {
changeState(expandableState: expandableState)
if let indexPath = indexPath,
let tableDirector = (tableView?.delegate as? TableDirector),
let cellHeightCalculator = tableDirector.rowHeightCalculator as? ExpandableCellHeightCalculator {
let tableDirector = (tableView?.delegate as? TableDirector),
let cellHeightCalculator = tableDirector.rowHeightCalculator as? ExpandableCellHeightCalculator {
cellHeightCalculator.updateCached(height: expandableState.height ?? height(layoutType: Self.layoutType), for: indexPath)
}
}