I'm using Parse SDK's localDataStore
to implement offline-capable Android app.
When users create new objects, they're pinned locally with a special label. When it's time to sync offline changes to the server, I search for all objects pinned with that label and save
them. At that point, after the object is synced to the server, I want to remove the label, but keep the object pinned locally. The only way I found to achieve that is this:
parseObject.save();
parseObject.unpin(ParsePinLabels.MODIFIED_OFFLINE);
parseObject.pin();
Two problems with this approach:
- Takes too long
- Ugly
My intuition says that in this scenario it should be enough to just remove the label from the already pinned ParseObject
, but I can't find a way to do that without full unpin
. What do I miss?