{"push_id":973617484,"size":3,"distinct_size":0,"ref":"refs/heads/master","head":"509e7c1f6f4350444e7d1bb5b5f5186b4a16156a","before":"b7e007110f54bccc3bfee601e9520da747b6e911","commits":[{"sha":"ee33b62297994cff065e628c9d9f27c1e04b0b43","author":{"email":"58668e7669fd564d99db5d581fcdb6a5618440b5@Ms-iMac.home","name":"M"},"message":"Commit current state.","distinct":false,"url":"https://api.github.com/repos/condemned77/VirtualTourist_UDACity/commits/ee33b62297994cff065e628c9d9f27c1e04b0b43"},{"sha":"7cf66d7e666d6a3e4573de02f736d51d4f2dac38","author":{"email":"58668e7669fd564d99db5d581fcdb6a5618440b5@Ms-iMac.home","name":"M"},"message":"Photos are now shown in the PhotoCollectionViewCell.\n\nWhat doesn't work?\n- Placeholder image isn't seen when the TravelLocationsViewController is\n  displayed.\n- Downloading of images is only done when a pin is dropped on the map.\n- Photos seem to be associated to multiple pins, not just one.\n\nPhoto\n  - Added startLoadingPhoto method.\n    This method makes use of the ImageCache of the FlickrAPI class. If this\n    class has an image available, there is no need to download the image from\n    a url.\n    If no image is available the method does starts downloading the image that\n    is available behind its corresponding imageURL (iVar).\n\nFlickrAPI\n  - The image URL is now stores as an NSString. This happened due to the fact\n    that abstraction wise, only the FlickrAPI has to use the url string as an\n    actual url. Also the url string is now stored via core data.\n\n  - The method downloadImageData now extracts the image urls as string and\n    doesn't convert  them into url for later use. This is due to the fact, that\n    the class that uses the url strings, stores them as strings anyways, and\n    would have to reconvert them.\n\nPin\n  - The photos iVar is now of type NSMutableOrderedSet and not an array anymore.\n    CoreData internally works with NSSets, which led to incompatibilities with\n    CoreData at runtime.\n\n  - The addImage method now works with a string array (of url strings) as\n    described in the commit message about the FlickrAPI.\n\nPhotoAlbumViewController\n  - The PhotoAlbumViewController now work with its desired data directly,\n    instead of unwrapping it from a pin instance. I.e. the pin reference has\n    been removed, while the pinCoordinates (for the mapview), the photos\n    instances and map annotation are now assigned directly.\n\nPhotoCollectionViewCell\n  - added observer to photo instance variable. When the photo variable is set,\n    it is told to start loading its image.\n\n  - When the image is loaded, the photo instance calls the method imageLoaded\n    on its delegate (the PhotoCollectionViewCell instance). When this happens,\n    the PhotoCollectionViewCell displays the image view and stops the activity\n    indicator.\n\nTravelLocationsViewController\n  - When a pin (MKPointAnnotation) is selected on the map, the associated pin\n    instance is taken and its coordinates are given to the\n    PhotoAlbumViewController in order to place the MKPointAnnotation when the\n    TravelLocationsViewController is presented. Same goes for the current mapView\n    location (mapView.region).","distinct":false,"url":"https://api.github.com/repos/condemned77/VirtualTourist_UDACity/commits/7cf66d7e666d6a3e4573de02f736d51d4f2dac38"},{"sha":"509e7c1f6f4350444e7d1bb5b5f5186b4a16156a","author":{"email":"f8c38b2167c0ab6d7c720e47c2139428d77d8b6a@addapptr.com","name":"Michael Jaeger"},"message":"Added reloading of cell images.\n\nConstants\n  - Added constant declaration of maximum amount of photos\n    that are displayed on the UICollectionView.\n\nFlickrAPI\n  - Refactored the method searchByLatLon.\n    The method is now named searchImagesByLatLon and takes a coordinate and\n    a completion handler. Through this the FlickrAPI is independent from the\n    Pin class. Instead, through the new parameters, the coordinates can be\n    passed in by any class, while the completion handler allows for a tailored\n    workflow.\n\n  - Refactored the method downloadImageData. The method now takes a completion\n    handler, to conform to the method searchImagesByLatLon. The method passes\n    the downloaded URL strings of images on Flickr to the completion handler,\n    which in turn can process it as desired.\n\nPhoto\n  - The method startLoadingPhoto has been renamed to startLoadingPhotoURL.\n    Its implementation does check for the photoImage ivar and reacts if an\n    image isn't present yet, and start downloading or tells the delegate\n    accordingly.\n\nPin\n  - Refactored method startFetchingPhotos. The method has been renamed to\n    fetchNewPhoto in order to semantically account for the case when new\n    photos should be downloaded in order to replace the images.\n    Therefore the implementation makes use of the FlickrAPI class by specifying\n    a completion handler which iterates over all downloaded URLs and assigns\n    the corresponding URLs to the pin's photos.\n\n  - Refactored the method addImages. When URLs of photos are passed to the\n    method, these are assigned to Photo instances, which are also created.\n    This might be a problem, because it doesn't seem possible to update URLs.\n    Consider to add another method updateImageURLs().\n    The method also saves the current context, which makes it possible to\n    persist Photo instances.\n    The method also makes use of the constant maxAmountOfPhotos, as described\n    above.\n\nPhotoAlbumViewController\n  - Added IBOutlet to its contained collectionView.\n\n  - Implemented the method newCollectionPressed. This IBAction method is\n    supposed trigger a download of new images inside its collectionView.\n    These images are supposed to be exchanged while the viewController is\n    displayed. In order to do this, the method does the following:\n    1. remove all images from the cell that are currently displayed.\n    2. use the FlickrAPI class to download new image urls and assign new\n       urls to photo instances that are stored as instance variables.\n    3. after a url has been assigned to a Photo instance, a download of\n      the underlying image is triggered.\n\n  - Added method removeCurrentlyDisplayedImages, which iterates over all held\n    Photo instances and deletes the stored image.\n\n  - Added method findNewImageURLs(...), which takes an array of urls and\n    compares those to the ones that are currently used for display. If the url\n    is a new one, i.e. not currently displayed, the url is stored in an array\n    called freshImageURLs. This collection of fresh urls is returned by the\n    method.\n\n  - Added method urlisCurrentlyDisplayed, which check whether the passed url\n    is already assigned to a Photo instance that is currently is use. Based\n    on this evaluation true of false is returned.\n\n  - Added if condition to collectionView: numberOfItemsInSection that makes\n    sure that the maximum amount of displayed photos is 21.\n\nPhotoCollectionViewCell\n  - When cell instance is notified that an image has been loaded, the activity\n    indicator is removed from the cell's view.","distinct":false,"url":"https://api.github.com/repos/condemned77/VirtualTourist_UDACity/commits/509e7c1f6f4350444e7d1bb5b5f5186b4a16156a"}]}