KNContactsPicker
KNContactsPicker copied to clipboard
Fix contacts sorter
This commit fixes the contacts sorter to conform to how the iOS Contacts app sorts its contacts
Just adding a comment to explain further, I noticed the contacts weren't actually being sorted within the section they were allocated to, so this fixes that. Additionally, any contacts that only have a givenName or familyName or sorted in a way that conforms to how iOS contacts are shown. For example, if a contact has only a givenName like "Angie" and the sorting method is set to by familyName, we'll compare "Angie" to the last name of other contacts instead of just using an empty string to compare.
Thanks for this contribution @eforkin. I will merge it ☺️