New IterableEmbeddedUpdateHandler methods for sync failure and success.#989
New IterableEmbeddedUpdateHandler methods for sync failure and success.#989franco-zalamena-iterable wants to merge 5 commits intomasterfrom
Conversation
| try { | ||
| processEmbeddedMessagesResponse(data) | ||
| } catch (e: JSONException) { | ||
| IterableLogger.e(TAG, e.toString()) | ||
| } | ||
| notifySyncSucceeded() |
There was a problem hiding this comment.
We should move notifySyncSucceeded() inside the try block, and add a notifySyncFailed(e.message) to the catch. So it matches iOS behavior exactly: parse errors won't falsely report success.
| try { | |
| processEmbeddedMessagesResponse(data) | |
| } catch (e: JSONException) { | |
| IterableLogger.e(TAG, e.toString()) | |
| } | |
| notifySyncSucceeded() | |
| try { | |
| processEmbeddedMessagesResponse(data) | |
| notifySyncSucceeded() | |
| } catch (e: JSONException) { | |
| IterableLogger.e(TAG, e.toString()) | |
| notifySyncFailed(e.message) | |
| } |
276b142 to
d8bb8e4
Compare
sumeruchat
left a comment
There was a problem hiding this comment.
Also is the refactoring really necesssary. Any refactor runs the risk of introducing regressions. Lets try to get the minimum changeset that accomplishes the task and has no side effects.
Yes i think we should have android and ios matching, this change introduces no behavior change, it is only new callbacks |
d8bb8e4 to
cedf7c2
Compare
🔹 Jira Ticket(s) if any
✏️ Description
Creating new methods regarding sync success and failures for users to be able to act upon result.
Matching listener style from ios side
ios merged pr: Iterable/iterable-swift-sdk#988