mirror of
https://github.com/etesync/android
synced 2025-02-09 06:02:42 +00:00
Increase SEQUENCE only when we're ORGANIZER
This commit is contained in:
parent
00a400569a
commit
68781fd96e
@ -139,7 +139,7 @@ public class LocalCalendar extends AndroidCalendar implements LocalCollection {
|
|||||||
for (LocalEvent event : (LocalEvent[])queryEvents(Events.DIRTY + "!=0 AND " + Events.ORIGINAL_ID + " IS NULL", null)) {
|
for (LocalEvent event : (LocalEvent[])queryEvents(Events.DIRTY + "!=0 AND " + Events.ORIGINAL_ID + " IS NULL", null)) {
|
||||||
if (event.getEvent().sequence == null) // sequence has not been assigned yet (i.e. this event was just locally created)
|
if (event.getEvent().sequence == null) // sequence has not been assigned yet (i.e. this event was just locally created)
|
||||||
event.getEvent().sequence = 0;
|
event.getEvent().sequence = 0;
|
||||||
else
|
else if (event.weAreOrganizer)
|
||||||
event.getEvent().sequence++;
|
event.getEvent().sequence++;
|
||||||
dirty.add(event);
|
dirty.add(event);
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,8 @@ public class LocalEvent extends AndroidEvent implements LocalResource {
|
|||||||
@Getter protected String fileName;
|
@Getter protected String fileName;
|
||||||
@Getter @Setter protected String eTag;
|
@Getter @Setter protected String eTag;
|
||||||
|
|
||||||
|
public boolean weAreOrganizer = true;
|
||||||
|
|
||||||
public LocalEvent(@NonNull AndroidCalendar calendar, Event event, String fileName, String eTag) {
|
public LocalEvent(@NonNull AndroidCalendar calendar, Event event, String fileName, String eTag) {
|
||||||
super(calendar, event);
|
super(calendar, event);
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
@ -66,6 +68,8 @@ public class LocalEvent extends AndroidEvent implements LocalResource {
|
|||||||
event.uid = values.getAsString(COLUMN_UID);
|
event.uid = values.getAsString(COLUMN_UID);
|
||||||
|
|
||||||
event.sequence = values.getAsInteger(COLUMN_SEQUENCE);
|
event.sequence = values.getAsInteger(COLUMN_SEQUENCE);
|
||||||
|
if (values.getAsInteger(Events.IS_ORGANIZER) == 0)
|
||||||
|
weAreOrganizer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user