Event reply: copy calendar scale

pull/212/head
M66B 1 year ago
parent a28a049361
commit f1b6d6a80f

@ -3733,6 +3733,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (attachment.available && "text/calendar".equals(attachment.getMimeType())) {
File file = attachment.getFile(context);
ICalendar icalendar = Biweekly.parse(file).first();
CalendarScale scale = (icalendar.getCalendarScale() == null
? CalendarScale.gregorian()
: icalendar.getCalendarScale());
VEvent event = icalendar.getEvents().get(0);
if (action == R.id.ibCalendar) {
@ -3912,7 +3915,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
// https://icalendar.org/validator.html
ICalendar response = new ICalendar();
response.setCalendarScale(CalendarScale.gregorian());
response.setCalendarScale(scale);
response.setMethod(Method.REPLY);
response.addEvent(ev);

Loading…
Cancel
Save