polqf / RealmResultsController

A NSFetchedResultsController implementation for Realm written in Swift
MIT License
188 stars 25 forks source link

Fixed issue where item wasn't moved to new section. #81

Open jallen opened 8 years ago

jallen commented 8 years ago

:tophat: What? Why?

If an item is moved to a new section and the section doesn't exist the item is Inserted instead of moved causing the section in the tableView to not be displayed.

:family: Dependencies?

:clipboard: Developer checklist

![]() If the section didn't exist before the item was moved the updated item would be inserted instead of moved causing the new section to not be displayed properly in the tableView.

polqf commented 8 years ago

Thanks for the PR @jallen 😄 Take a look at the comment I put, and sorry for the delay, I've been really busy the past days

jallen commented 8 years ago

I see where my test went wrong.

I'm now just filtering the initial set of objects. As far as I can tell this doesn't interfere with the request.

Also, maybe an initResolvedWithKeyPath method would be cleaner?

Let me know what you think.