Skip to content

Commit

Permalink
Improved checking for empty state
Browse files Browse the repository at this point in the history
Change-Id: Iffb3eb5e6e7d8f738ae1ad1ad2de5d4aad63f5b9
  • Loading branch information
kwigbo authored and tilltue committed Jul 6, 2024
1 parent bc9ae7f commit b5b69f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ extension TLPhotosPickerViewController: TLPhotoLibraryDelegate {
func loadCompleteAllCollection(collections: [TLAssetsCollection]) {
self.collections = collections
self.focusFirstCollection()
let isEmpty = self.collections.count == 0
let isEmpty = !self.collections.contains(where: { $0.count > 0 })
self.subTitleStackView.isHidden = isEmpty
self.emptyView.isHidden = !isEmpty
self.emptyImageView.isHidden = self.emptyImageView.image == nil
Expand Down

0 comments on commit b5b69f4

Please sign in to comment.