strvcom / ios-chat-component

Chat modular library
MIT License
1 stars 1 forks source link

Run all networking code only after the initialization is finished #12

Closed danpecher closed 4 years ago

danpecher commented 4 years ago

I moved ChatIdentifier creation to ChatCore so that it can be returned to the caller without waiting for networking to finish loading.

Every method call that is supposed to be run after the loading is finished needs to add the willRunAfterInit call to its beginning. That method will check if loading is finished and if not, it caches the call for later run. The method also returns an answer to the question willRunAfterInit? so that the calling method can either return early or continue executing.