|
|
@ -1845,7 +1845,7 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
|
|
|
boolean autoresize = prefs.getBoolean("autoresize", true);
|
|
|
|
boolean autoresize = prefs.getBoolean("autoresize", true);
|
|
|
|
|
|
|
|
|
|
|
|
if (autoresize &&
|
|
|
|
if (autoresize && file.exists() /* upload cancelled */ &&
|
|
|
|
("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) {
|
|
|
|
("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) {
|
|
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
|
|
options.inJustDecodeBounds = true;
|
|
|
|
options.inJustDecodeBounds = true;
|
|
|
@ -1891,7 +1891,6 @@ public class FragmentCompose extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
|
|
db.attachment().setDownloaded(attachment.id, size);
|
|
|
|
db.attachment().setDownloaded(attachment.id, size);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (IOException ex) {
|
|
|
|
} catch (IOException ex) {
|
|
|
|
// Reset progress on failure
|
|
|
|
// Reset progress on failure
|
|
|
|
db.attachment().setProgress(attachment.id, null);
|
|
|
|
db.attachment().setProgress(attachment.id, null);
|
|
|
|