diff --git a/ActiveSync/iCalRecurrenceRule+ActiveSync.m b/ActiveSync/iCalRecurrenceRule+ActiveSync.m index 8e7cf57cb..a9060fe27 100644 --- a/ActiveSync/iCalRecurrenceRule+ActiveSync.m +++ b/ActiveSync/iCalRecurrenceRule+ActiveSync.m @@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import +#import #import #import "NSCalendarDate+ActiveSync.h" @@ -77,10 +78,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. occurrences = [[self byDayMask] weekDayOccurrences]; v = 0; - for (i = 0; i < 7; i++) + if (occurrences) { - if (occurrences[0][i]) - v += (1 << i); + for (i = 0; i < 7; i++) + { + if (occurrences[0][i]) + v += (1 << i); + } + } + else + { + // No byDayMask, we take the event's start date to compute the DayOfWeek + // 0 == Sunday, 6 == Saturday + v = (1 << [[[self parent] startDate] dayOfWeek]); } [s appendFormat: @"%d", v]; @@ -125,6 +135,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // FIXME } } + else + { + // Simple reccurrence rule of type "Monthly" + type = 2; + [s appendFormat: @"%d", + [[[self parent] startDate] dayOfMonth]]; + } } else if ([self frequency] == iCalRecurrenceFrequenceYearly) { diff --git a/NEWS b/NEWS index 2e45be95b..7ed8d9495 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Enhancements Bug fixes - avoid crashing when we forward an email with no Subject header - we no longer try to include attachments when replying to a mail + - fixed ActiveSync repetitive events issues with "Weekly" and "Monthly" ones 2.2.4 (2014-05-29) ------------------