Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Add button to pre-download images to cache. Show when listed images are in cache. #26

Merged
merged 7 commits into from
Mar 28, 2018

Conversation

nguyen-phillip
Copy link
Contributor

  • show green check next to cached images.
  • show download button next to uncached images so that they can be downloaded before imaging.
  • use blocks to handle sheet completion / cancel so that related code can stay together and to make chaining multiple actions together easier.

russellhancox
russellhancox previously approved these changes Mar 26, 2018
@@ -20,6 +20,6 @@
- (IBAction)continue:(id)sender;
- (IBAction)cancel:(id)sender;

@property(readonly, nonatomic) BOOL shouldContinue;

@property void (^completionBlock)(void);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

block properties should be copy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

for (NSIndexPath *indexPath in self.collectionView.selectionIndexPaths) {
NSViewController *item = [self.collectionView itemAtIndexPath:indexPath];
if (![item isKindOfClass:[CollectionViewItemAvailable class]]) continue;
CollectionViewItemAvailable *cvia = (CollectionViewItemAvailable *)item;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consider a more descriptive variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the extra cvia variable entirely & made item into an NSCollectionViewItem *

@nguyen-phillip
Copy link
Contributor Author

PTAL

@nguyen-phillip nguyen-phillip merged commit 75fea89 into google:master Mar 28, 2018
@nguyen-phillip nguyen-phillip deleted the interface branch March 29, 2018 20:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants