Removing deprecated flatMap

This commit is contained in:
Nixsm 2018-04-06 11:07:34 -03:00
parent 04f02d9148
commit 95f96be31d
1 changed files with 2 additions and 2 deletions

View File

@ -259,11 +259,11 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
if reload {
let indexPathsToReload = cells.enumerated()
.flatMap { (arg) -> IndexPath? in
.compactMap { (arg) -> IndexPath? in
let (index, cell) = arg
return cell == nil ? indexPaths[index] : nil
}
.flatMap { (indexPath: IndexPath) -> IndexPath? in
.compactMap { (indexPath: IndexPath) -> IndexPath? in
return (indexPath.item >= 0 && indexPath.item < buttonBarView.numberOfItems(inSection: indexPath.section)) ? indexPath : nil
}