mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
List monitor contains updated data but calling fetchAll in main thread does not return updated data #285
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @matrosovDev on GitHub (Aug 13, 2019).
Can you please comment on this question
I have prepared workaround by getting values from list monitor but not sure if it's correct. I would like to call fetchAll after listMonitorDidChange actually when core data records are updated.
@matrosovDev commented on GitHub (Aug 15, 2019):
Looks I figure out, how it works, so evertyime data is changed in CoreData list motor is notified about it and already exist with needed data in it, as I understood we just need this callback function to reload data for example and etc.
My question is can I search through monitor. So I need to search or filter this:
do I need to reassign
let monitorproperty each time when I search?let's say textfield triggered by entering a latter should I init
monitoragain with some .where statement?@JohnEstropia commented on GitHub (Sep 22, 2019):
@matrosovDev ListMonitor would not be your tool for the job here. I would suggest to use a plain
fetchAllwhenever your textField triggers a new search