mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 18:11:03 +01:00
Check if attachment upload was canceled
This commit is contained in:
@@ -1845,7 +1845,7 @@ public class FragmentCompose extends FragmentBase {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean autoresize = prefs.getBoolean("autoresize", true);
|
||||
|
||||
if (autoresize &&
|
||||
if (autoresize && file.exists() /* upload cancelled */ &&
|
||||
("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inJustDecodeBounds = true;
|
||||
@@ -1891,7 +1891,6 @@ public class FragmentCompose extends FragmentBase {
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
|
||||
|
||||
} catch (IOException ex) {
|
||||
// Reset progress on failure
|
||||
db.attachment().setProgress(attachment.id, null);
|
||||
|
||||
Reference in New Issue
Block a user