mirror of https://github.com/M66B/FairEmail.git
Check if attachment upload was canceled
This commit is contained in:
parent
1a08fe8058
commit
bb9a634a07
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue