gdavis / FGallery-iPhone

Objective-C based gallery for iPhones
583 stars 144 forks source link

remove image doesn't work/update properly #24

Open scottg2 opened 12 years ago

scottg2 commented 12 years ago

Using the removeImageAtIndex: method, it removes the image but doesn't update the photo view properly. It just presents a black background - if you then thumb left or right the image indexing seems all messed up (wrong photos come up, doesn't show some). I'm only testing with between five to ten images and only in fullscreen, not using thumbnails at all. I'm loading all images from the files system.

Took a look at the method implementation for removeImageAtIndex and I don't see it doing anything to adjust or check _currentIndex (against the [_photoSource numberOfPhotosForPhotoGallery:self] upper boundary. Also the moveScrollerToCurrentIndexWithAnimation: call from layoutViews: is using the _currentIndex but I couldn't figure out exactly what it was doing with the scroller frame calculations.

scottg2 commented 12 years ago

Work around for this issue is to grab _currentIndex, call reloadGallery, then call goToImageAtIndex:_currentIndex. However, this is less efficient than what the removeImageAtIndex: method is trying to do. I don't notice any performance impact using this work around, with appx. 40 to 50 images in the gallery.

jetstar89 commented 11 years ago

This issue was opened long time ago. Is there any update about this issue FGalarry team? thanks!