Refactoring

pull/214/head
M66B 9 months ago
parent 5fa40c5c5e
commit 4923d9c2a1

@ -5198,11 +5198,17 @@ public class FragmentCompose extends FragmentBase {
private static void resizeAttachment(Context context, EntityAttachment attachment, int resize) throws IOException {
File file = attachment.getFile(context);
if (file.exists() /* upload cancelled */ &&
("image/jpg".equals(attachment.type) ||
"image/jpeg".equals(attachment.type) ||
"image/png".equals(attachment.type) ||
"image/webp".equals(attachment.type))) {
if (!file.exists()) // Upload cancelled;
return;
if (!"image/jpg".equals(attachment.type) &&
!"image/jpeg".equals(attachment.type) &&
!"image/png".equals(attachment.type) &&
!"image/webp".equals(attachment.type)) {
Log.i("Skipping resize of type=" + attachment.type);
return;
}
ExifInterface exifSaved;
try {
exifSaved = new ExifInterface(file);
@ -5296,7 +5302,6 @@ public class FragmentCompose extends FragmentBase {
}
}
}
}
private SimpleTask<DraftData> draftLoader = new SimpleTask<DraftData>() {
@Override

Loading…
Cancel
Save