mirror of
https://github.com/etesync/android
synced 2024-11-26 01:48:34 +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++;
|
syncResult.stats.numUpdates++;
|
||||||
} else {
|
} else {
|
||||||
App.log.info("Adding " + newData.uid + " to local calendar");
|
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();
|
localEvent.add();
|
||||||
syncResult.stats.numInserts++;
|
syncResult.stats.numInserts++;
|
||||||
}
|
}
|
||||||
|
@ -193,13 +193,13 @@ public class ContactsSyncManager extends SyncManager {
|
|||||||
if (local == null) {
|
if (local == null) {
|
||||||
if (newData.group) {
|
if (newData.group) {
|
||||||
App.log.log(Level.INFO, "Creating local group", newData);
|
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();
|
group.create();
|
||||||
|
|
||||||
local = group;
|
local = group;
|
||||||
} else {
|
} else {
|
||||||
App.log.log(Level.INFO, "Creating local contact", newData);
|
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();
|
contact.create();
|
||||||
|
|
||||||
local = contact;
|
local = contact;
|
||||||
|
Loading…
Reference in New Issue
Block a user