Use temporary calendar files

pull/160/head
M66B 5 years ago
parent f0456e1a41
commit 0fa78c3e66

@ -1364,10 +1364,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
response.setMethod(Method.REPLY);
response.addEvent(ev);
File dir = new File(context.getFilesDir(), "temporary");
if (!dir.exists())
dir.mkdir();
File ics = new File(dir, "meeting.ics");
File ics = File.createTempFile(Long.toString(attachment.id), ".ics", context.getCacheDir());
response.write(ics);
return ics;

@ -2179,7 +2179,7 @@ public class FragmentCompose extends FragmentBase {
EntityAttachment attachment = new EntityAttachment();
attachment.message = draft.id;
attachment.sequence = 1;
attachment.name = ics.getName();
attachment.name = "meeting.ics";
attachment.type = "text/calendar";
attachment.disposition = Part.ATTACHMENT;
attachment.size = ics.length();

Loading…
Cancel
Save