diff --git a/app/src/main/java/eu/faircode/email/DaoAttachment.java b/app/src/main/java/eu/faircode/email/DaoAttachment.java index f53962f20f..d9824d8806 100644 --- a/app/src/main/java/eu/faircode/email/DaoAttachment.java +++ b/app/src/main/java/eu/faircode/email/DaoAttachment.java @@ -102,6 +102,12 @@ public interface DaoAttachment { " AND (NOT (error IS :error) OR progress IS NOT NULL OR NOT (available IS 0))") void setError(long id, String error); + @Query("UPDATE attachment" + + " SET error = :error" + + " WHERE id = :id" + + " AND NOT (error IS :error)") + void setWarning(long id, String error); + @Query("UPDATE attachment" + " SET type = :type" + " WHERE id = :id" + diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index b1eb8cbe21..77d1de3517 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -3441,7 +3441,7 @@ public class MessageHelper { } } catch (Throwable ex) { Log.e(ex); - db.attachment().setError(local.id, Log.formatThrowable(ex)); + db.attachment().setWarning(local.id, Log.formatThrowable(ex)); } } }