mirror of
https://github.com/etesync/android
synced 2024-11-22 07:58:09 +00:00
Resource: set eTag when creating a new one from server.
Before this commit we would create new entries from the server without an etag, essentially marking them as "local only". While the actual value of the eTag is not currently used, null or not matters. Because the resources were "local only", we would get weird behaviours like having an "ADD" action when changing a resource.
This commit is contained in:
parent
84244330b7
commit
5d1c90dcba
@ -113,7 +113,7 @@ public class CalendarSyncManager extends SyncManager {
|
||||
syncResult.stats.numUpdates++;
|
||||
} else {
|
||||
App.log.info("Adding " + newData.uid + " to local calendar");
|
||||
localEvent = new LocalEvent(localCalendar(), newData, newData.uid, null);
|
||||
localEvent = new LocalEvent(localCalendar(), newData, newData.uid, newData.uid);
|
||||
localEvent.add();
|
||||
syncResult.stats.numInserts++;
|
||||
}
|
||||
|
@ -193,13 +193,13 @@ public class ContactsSyncManager extends SyncManager {
|
||||
if (local == null) {
|
||||
if (newData.group) {
|
||||
App.log.log(Level.INFO, "Creating local group", newData);
|
||||
LocalGroup group = new LocalGroup(localAddressBook(), newData, uuid, null);
|
||||
LocalGroup group = new LocalGroup(localAddressBook(), newData, uuid, uuid);
|
||||
group.create();
|
||||
|
||||
local = group;
|
||||
} else {
|
||||
App.log.log(Level.INFO, "Creating local contact", newData);
|
||||
LocalContact contact = new LocalContact(localAddressBook(), newData, uuid, null);
|
||||
LocalContact contact = new LocalContact(localAddressBook(), newData, uuid, uuid);
|
||||
contact.create();
|
||||
|
||||
local = contact;
|
||||
|
Loading…
Reference in New Issue
Block a user