Skip to content

Commit

Permalink
Merge pull request #148 from kevinwo/master
Browse files Browse the repository at this point in the history
Use estimatedAssetCount when updating collections
  • Loading branch information
1and2papa committed Sep 24, 2015
2 parents 8bc9753 + f0af0ba commit 0dd4f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CTAssetsPickerController/CTAssetCollectionViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ - (void)updateAssetCollections
{
for (PHAssetCollection *assetCollection in fetchResult)
{
NSInteger count = [assetCollection ctassetPikcerCountOfAssetsFetchedWithOptions:self.picker.assetsFetchOptions];
NSInteger count = (assetCollection.estimatedAssetCount) ? assetCollection.estimatedAssetCount : 0;

if (self.picker.showsEmptyAlbums || count > 0)
[assetCollections addObject:assetCollection];
Expand Down

0 comments on commit 0dd4f14

Please sign in to comment.