You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.
Related to #146
Let's say I have a model in localStorage. Its key would be something like http://ip/some/path/stuff_dirty.
When I come back online and call syncDirtyAndDestroyed, I expect all the _dirty (and _destroyed) models to be cleared from localStorage. However, this does not happen.
Perhaps this changes something, but I'm testing this from the console. I'm calling mystore.save(somemodel) and then disconnecting and reconnecting twice. Both times it tries to sync that model (2 POSTS).
I feel like there should be a window.localStorage.clear() after the syncDirtyAndDestroyed (at the end of). Of course it would have to be implemented more carefully, because if the sync fails, localstorage would still be cleared. It would need to remove only the models that were successfully synced.
Edit:
Actually, I see now that syncDirty calls save which in turn calls dualsync. Something in there should be clearing localStorage.
The text was updated successfully, but these errors were encountered:
Related to #146
Let's say I have a model in localStorage. Its key would be something like
http://ip/some/path/stuff_dirty
.When I come back online and call
syncDirtyAndDestroyed
, I expect all the_dirty
(and_destroyed
) models to be cleared from localStorage. However, this does not happen.Perhaps this changes something, but I'm testing this from the console. I'm calling
mystore.save(somemodel)
and then disconnecting and reconnecting twice. Both times it tries to sync that model (2 POSTS).I feel like there should be a
window.localStorage.clear()
after thesyncDirtyAndDestroyed
(at the end of). Of course it would have to be implemented more carefully, because if the sync fails, localstorage would still be cleared. It would need to remove only the models that were successfully synced.Edit:
Actually, I see now that
syncDirty
callssave
which in turn callsdualsync
. Something in there should be clearing localStorage.The text was updated successfully, but these errors were encountered: