Skip to content

Commit

Permalink
[nemo-qml-plugin-calendar] Extract notebook email from sharedWith() i…
Browse files Browse the repository at this point in the history
…f necessary. Contributes to JB#45600

Google sync plugin will place notebook email address (or group address)
into the sharedWith() field.
  • Loading branch information
Chris Adams committed Jun 14, 2019
1 parent b880a3f commit 3eaecfb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/calendarworker.cpp
Expand Up @@ -811,10 +811,7 @@ CalendarData::Event CalendarWorker::createEventStruct(const KCalCore::Event::Ptr
foreach (KCalCore::Attendee::Ptr calAttendee, attendees) {
if (calAttendee->email() == calendarOwnerEmail) {
event.ownerStatus = CalendarUtils::convertPartStat(calAttendee->status());
//TODO: KCalCore::Attendee::RSVP() returns false even if response was requested for some accounts like Google.
// We can use attendee role until the problem is not fixed (probably in Google plugin).
// To be updated later when google account support for responses is added.
event.rsvp = calAttendee->RSVP();// || calAttendee->role() != KCalCore::Attendee::Chair;
event.rsvp = calAttendee->RSVP();
}
}

Expand Down Expand Up @@ -846,6 +843,9 @@ void CalendarWorker::loadNotebooks()
notebook.uid = mkNotebook->uid();
notebook.description = mkNotebook->description();
notebook.emailAddress = mKCal::ServiceHandler::instance().emailAddress(mkNotebook, mStorage);
if (notebook.emailAddress.isEmpty()) {
notebook.emailAddress = mkNotebook->sharedWith().size() ? mkNotebook->sharedWith().first() : QString();
}
notebook.isDefault = mkNotebook->isDefault();
notebook.readOnly = mkNotebook->isReadOnly();
notebook.localCalendar = mkNotebook->isMaster()
Expand Down

0 comments on commit 3eaecfb

Please sign in to comment.