mirror of
https://github.com/etesync/android
synced 2025-02-02 19:01:06 +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)) {
|
||||
if (event.getEvent().sequence == null) // sequence has not been assigned yet (i.e. this event was just locally created)
|
||||
event.getEvent().sequence = 0;
|
||||
else
|
||||
else if (event.weAreOrganizer)
|
||||
event.getEvent().sequence++;
|
||||
dirty.add(event);
|
||||
}
|
||||
|
@ -41,6 +41,8 @@ public class LocalEvent extends AndroidEvent implements LocalResource {
|
||||
@Getter protected String fileName;
|
||||
@Getter @Setter protected String eTag;
|
||||
|
||||
public boolean weAreOrganizer = true;
|
||||
|
||||
public LocalEvent(@NonNull AndroidCalendar calendar, Event event, String fileName, String eTag) {
|
||||
super(calendar, event);
|
||||
this.fileName = fileName;
|
||||
@ -66,6 +68,8 @@ public class LocalEvent extends AndroidEvent implements LocalResource {
|
||||
event.uid = values.getAsString(COLUMN_UID);
|
||||
|
||||
event.sequence = values.getAsInteger(COLUMN_SEQUENCE);
|
||||
if (values.getAsInteger(Events.IS_ORGANIZER) == 0)
|
||||
weAreOrganizer = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user