Skip to content

Commit 5a582e2

Browse files
committed
clean code
1 parent 0845a7b commit 5a582e2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

BeeSwift/Gallery/GalleryViewController.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,7 @@ class GalleryViewController: UIViewController, UICollectionViewDelegateFlowLayou
403403
}
404404

405405
func numberOfSections(in collectionView: UICollectionView) -> Int {
406-
switch (filteredGoals.isEmpty, goals.isEmpty) {
407-
case (true, false):
408-
return 0
409-
case (true, true):
410-
return 0
411-
default:
412-
return 1
413-
}
406+
[filteredGoals.isEmpty, goals.isEmpty].contains(true) ? 0 : 1
414407
}
415408

416409
private func setBackgroundView(filteredGoals: [Goal], goals: [Goal]) {

0 commit comments

Comments
 (0)