Removing deprecated flatMap
This commit is contained in:
parent
04f02d9148
commit
95f96be31d
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue