Skip to content

Commit

Permalink
[nemo-qml-plugin-calendar] Don't detect recurs weekly when there are …
Browse files Browse the repository at this point in the history
…selected days.
  • Loading branch information
dcaliste committed May 14, 2020
1 parent c8c824f commit 04e7b64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/calendarutils.cpp
Expand Up @@ -47,6 +47,7 @@
#include <QFile>
#include <QUrl>
#include <QString>
#include <QBitArray>
#include <QByteArray>
#include <QtDebug>

Expand All @@ -63,9 +64,9 @@ CalendarEvent::Recur CalendarUtils::convertRecurrence(const KCalCore::Event::Ptr

if (rt == KCalCore::Recurrence::rDaily && freq == 1) {
return CalendarEvent::RecurDaily;
} else if (rt == KCalCore::Recurrence::rWeekly && freq == 1) {
} else if (rt == KCalCore::Recurrence::rWeekly && freq == 1 && event->recurrence()->days().count(true) == 0) {
return CalendarEvent::RecurWeekly;
} else if (rt == KCalCore::Recurrence::rWeekly && freq == 2) {
} else if (rt == KCalCore::Recurrence::rWeekly && freq == 2 && event->recurrence()->days().count(true) == 0) {
return CalendarEvent::RecurBiweekly;
} else if (rt == KCalCore::Recurrence::rMonthlyDay && freq == 1) {
return CalendarEvent::RecurMonthly;
Expand Down

0 comments on commit 04e7b64

Please sign in to comment.