challfry / TheKraken

An iOS client for the Twit-arr server.
3 stars 1 forks source link

Forum Image Viewing #86

Open cohoe opened 7 months ago

cohoe commented 7 months ago

Two anecdotes:

1) Images in a forum were off by an array index. Like, an image associated with post B contained the first image from post A or something like that.

2) Only showed one image per post (even if multiple)?

challfry commented 3 weeks ago

I think this was a problem with cell reuse and KVO.

UICollectionView automatically reuses cells; and most cells in Kraken work by observing Core Data objects for changes. I think the observations on images were broken in such a way that the cell didn't update properly for certain cell reuse cases, which may be related to the number of images in each post or whether the images were loaded yet. Anyway, it may be fixed now, but it's a bug that's a pain to determine exactly what's happening.