Put return on a newline within indexPathForLastItem

This commit is contained in:
Edward Warrender
2022-01-04 08:52:16 +00:00
parent ea086d7e4c
commit 88604e9441
+3 -1
View File
@@ -51,7 +51,9 @@ open class MessagesCollectionView: UICollectionView {
for offset in 1...numberOfSections {
let section = numberOfSections - offset
let lastItem = numberOfItems(inSection: section) - 1
if lastItem >= 0 { return IndexPath(item: lastItem, section: section) }
if lastItem >= 0 {
return IndexPath(item: lastItem, section: section)
}
}
return nil
}