Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1f28367 authored by Ken Shirriff's avatar Ken Shirriff
Browse files

Fix updates from read-only calendar.

Change 2934 introduced a bug that causes updates to an event on a
read-only shared calendar to be discarded by the device.  The
issue is the server version is null for a read-only calendar.

bug=1990826
parent 5f6133a1
Loading
Loading
Loading
Loading
+26 −23
Original line number Diff line number Diff line
@@ -369,10 +369,8 @@ public abstract class AbstractTableMerger
                // An existing server item has changed
                // If serverSyncVersion is null, there is no edit URL;
                // server won't let this change be written.
                // Just hold onto it, I guess, in case the server permissions
                // change later.
                if (serverSyncVersion != null) {
                boolean recordChanged = (localSyncVersion == null) ||
                        (serverSyncVersion == null) ||
                        !serverSyncVersion.equals(localSyncVersion);
                if (recordChanged) {
                    if (localSyncDirty) {
@@ -393,6 +391,11 @@ public abstract class AbstractTableMerger
                        }
                        update = true;
                    }
                } else {
                    if (Log.isLoggable(TAG, Log.VERBOSE)) {
                        Log.v(TAG,
                                "Skipping update: localSyncVersion: " + localSyncVersion +
                                ", serverSyncVersion: " + serverSyncVersion);
                    }
                }
            } else {