mirror of https://github.com/M66B/FairEmail.git
Use fixed attachment type for ICS recognition
This commit is contained in:
parent
f89c5546cc
commit
cfe47c7beb
|
@ -1791,7 +1791,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
if (show_inline || !inline || !attachment.available)
|
if (show_inline || !inline || !attachment.available)
|
||||||
a.add(attachment);
|
a.add(attachment);
|
||||||
|
|
||||||
if (attachment.available && "text/calendar".equals(attachment.type)) {
|
if (attachment.available && "text/calendar".equals(attachment.getMimeType())) {
|
||||||
calendar = true;
|
calendar = true;
|
||||||
bindCalendar(message, attachment);
|
bindCalendar(message, attachment);
|
||||||
}
|
}
|
||||||
|
@ -1960,7 +1960,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
List<EntityAttachment> attachments = db.attachment().getAttachments(id);
|
List<EntityAttachment> attachments = db.attachment().getAttachments(id);
|
||||||
for (EntityAttachment attachment : attachments)
|
for (EntityAttachment attachment : attachments)
|
||||||
if (attachment.available && "text/calendar".equals(attachment.type)) {
|
if (attachment.available && "text/calendar".equals(attachment.getMimeType())) {
|
||||||
File file = attachment.getFile(context);
|
File file = attachment.getFile(context);
|
||||||
ICalendar icalendar = Biweekly.parse(file).first();
|
ICalendar icalendar = Biweekly.parse(file).first();
|
||||||
VEvent event = icalendar.getEvents().get(0);
|
VEvent event = icalendar.getEvents().get(0);
|
||||||
|
|
Loading…
Reference in New Issue