Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb53475' into 'master'
[buteo-sync-plugins-social] Disable updating last modified time on event save. Contributes to JB#53475

See merge request mer-core/buteo-sync-plugins-social!91
  • Loading branch information
chriadam committed Mar 25, 2021
2 parents e0d5a9b + c8e8544 commit 8c7025e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rpm/buteo-sync-plugins-social.spec
Expand Up @@ -21,7 +21,7 @@ BuildRequires: pkgconfig(libsailfishkeyprovider)
BuildRequires: pkgconfig(contactcache-qt5)
BuildRequires: pkgconfig(qtcontacts-sqlite-qt5-extensions) >= 0.3.0
BuildRequires: pkgconfig(libmkcal-qt5) >= 0.5.9
BuildRequires: pkgconfig(KF5CalendarCore)
BuildRequires: pkgconfig(KF5CalendarCore) >= 5.79
BuildRequires: nemo-qml-plugin-notifications-qt5-devel
Requires: buteo-syncfw-qt5-msyncd
Requires: systemd
Expand Down
8 changes: 1 addition & 7 deletions src/google/google-calendars/googlecalendarsyncadaptor.cpp
Expand Up @@ -942,8 +942,6 @@ QString getErrorReason(const QByteArray &replyData)

KCalendarCore::Event::Ptr dissociateSingleOccurrence(const KCalendarCore::Event::Ptr &event, const QDateTime &dateTime)
{
const QDateTime modified = event->lastModified();

// Create a new incidence
KCalendarCore::Event::Ptr newEvent = KCalendarCore::Event::Ptr(event->clone());
newEvent->setCreated(QDateTime::currentDateTimeUtc());
Expand Down Expand Up @@ -974,9 +972,6 @@ KCalendarCore::Event::Ptr dissociateSingleOccurrence(const KCalendarCore::Event:
recId.time().second()));
newEvent->setRecurrenceId(recId);

// Don't update the modification date of the parent
event->setLastModified(modified);

return newEvent;
}

Expand All @@ -990,6 +985,7 @@ GoogleCalendarSyncAdaptor::GoogleCalendarSyncAdaptor(QObject *parent)
, m_storage(mKCal::ExtendedCalendar::defaultStorage(m_calendar))
, m_storageNeedsSave(false)
{
m_calendar->setUpdateLastModifiedOnChange(false);
setInitialActive(true);
}

Expand Down Expand Up @@ -3115,14 +3111,12 @@ void GoogleCalendarSyncAdaptor::applySyncFailureFlag(KCalendarCore::Event::Ptr e

if (current != updated) {
SOCIALD_LOG_DEBUG("Changing flag from" << current << "to" << updated << "for" << event->uid());
const QDateTime lastModified = event->lastModified();
if (!updated.isEmpty()) {
event->setCustomProperty(VOLATILE_APP, VOLATILE_NAME, updated);

} else {
event->removeCustomProperty(VOLATILE_APP, VOLATILE_NAME);
}
event->setLastModified(lastModified);
m_storageNeedsSave = true;
}
}
Expand Down

0 comments on commit 8c7025e

Please sign in to comment.