ceaseless-prayer / CeaselessIOS

This is the iOS application code for Ceaseless.
http://www.ceaselessprayer.com
MIT License
5 stars 2 forks source link

Internal ab change no sync #137

Closed chrislim closed 9 years ago

chrislim commented 9 years ago

Before when a person is added in the People view, the Syncing... overlay appears and it takes awhile and is quite annoying. Now if a person is added from within the app, we already handle creating a ceaseless contact for it, so instead the external callback that listens for changes to the address book checks to see if it is an app-internal change to the address book and if so it does not do the syncing process.

We had to do something somewhat hacky--the OS sends multiple address book change notifications, so we had to smooth that over with a timer that runs the handler one time for all notifications within a 3 second window of each other. In testing it seemed sufficiently reliable.