mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Use temporary calendar files
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user