-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListObjectObserver
callbacks are not triggered after transaction.deleteAll
#444
Comments
@oligazar I don't see anything that stands out from the snippet you posted, but some ideas that come to mind:
|
@JohnEstropia thanks for your reply!
Maybe there's a way to check whether |
Yes, but what I mean was, are the new objects that are inserted afterwards still satisfying this predicate?
To clarify, the Otherwise, there must be something else going on that breaks the notification chain. You can test the CoreStore demo app (example titled |
Yes, new objects are still satisfying the predicate
So reinstantiating the monitor should resolve the issue, I guess? I believe the demo app works as expected. The issue is most likely in my code. I just struggle to figure it out for a few days now. |
After using
transaction.deleteAll
insideasynchronous
I don't get anyListObjectObserver
events anymore.So in the following code snippet after fetching any new page from API I add new items to the db. But once I need to restart pagination from the page 1, I want to remove all the outdated data (it's controlled by
forceRefresh
flag). This operation seems to run successfully, meaning I do getlistMonitorDidChange
callback invocation, which I'm interested in. But all the subsequent inserts with new pages data don't trigger anyListObjectObserver
callbacks anymore.I need some hint to figure out what can cause the issue because so far I'm very frustrated by it.
Thanks a lot!
The text was updated successfully, but these errors were encountered: