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

Commit 9c5a53e8 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

Merge branch '7948-t-recurrence-support-importing-ics' into 'v1-t'

feat: add recurrence rule support for importing calendar event from .ics file [v1-t]

See merge request !72
parents a46edd63 2b6da7f8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -162,6 +162,8 @@ public class ImportActivity extends Activity {
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.URL)));
        calIntent.putExtra(CalendarContract.Events.ORGANIZER,
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.ORGANIZER)));
        calIntent.putExtra(CalendarContract.Events.RRULE,
                IcalendarUtils.uncleanseString(firstEvent.getProperty(VEvent.RRULE)));

        if (firstEvent.mAttendees.size() > 0) {
            StringBuilder builder = new StringBuilder();
+2 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ public class VEvent {
    public static String DESCRIPTION = "DESCRIPTION";
    public static String ATTENDEE = "ATTENDEE";
    public static String CATEGORIES = "CATEGORIES";
    public static String RRULE = "RRULE"; // Recurrence rule, example: FREQ=WEEKLY;COUNT=10;BYDAY=MO

    // Stores the -arity of the attributes that this component can have
    private static HashMap<String, Integer> sPropertyList = new HashMap<String, Integer>();
@@ -66,10 +67,10 @@ public class VEvent {
        sPropertyList.put(DTSTAMP,1);
        sPropertyList.put(SUMMARY,1);
        sPropertyList.put(DESCRIPTION,1);

        sPropertyList.put(ATTENDEE, Integer.MAX_VALUE);
        sPropertyList.put(CATEGORIES, Integer.MAX_VALUE);
        sPropertyList.put(CATEGORIES, Integer.MAX_VALUE);
        sPropertyList.put(RRULE, 1);
    }

    // Stores attributes and their corresponding values belonging to the Event component