From c9eb3ebae3dda495fecdfcf6d8774897c34adfa1 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 4 Jun 2022 08:18:50 +0200 Subject: [PATCH] Guess all attachment extensions --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index c30d9683c2..7d9a358479 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -4237,9 +4237,9 @@ public class FragmentCompose extends FragmentBase { UriInfo info = getInfo(uri, context); String ext = Helper.getExtension(info.name); - if (info.name != null && ext == null && - info.type != null && ImageHelper.isImage(info.type.toLowerCase(Locale.ROOT))) { - String guessed = MimeTypeMap.getSingleton().getExtensionFromMimeType(info.type.toLowerCase(Locale.ROOT)); + if (info.name != null && ext == null && info.type != null) { + String guessed = MimeTypeMap.getSingleton() + .getExtensionFromMimeType(info.type.toLowerCase(Locale.ROOT)); if (!TextUtils.isEmpty(guessed)) { ext = guessed; info.name += '.' + ext;