mirror of https://github.com/M66B/FairEmail.git
Respect save drafts setting for draft orphans
This commit is contained in:
parent
974878adf0
commit
91dc834295
|
@ -812,8 +812,11 @@ public class EntityOperation {
|
|||
List<EntityMessage> orphans = db.message().getDraftOrphans(folder.id);
|
||||
if (orphans != null) {
|
||||
EntityLog.log(context, "Draft orphans=" + orphans.size());
|
||||
for (EntityMessage orphan : orphans)
|
||||
EntityOperation.queue(context, orphan, EntityOperation.ADD);
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean save_drafts = prefs.getBoolean("save_drafts", true);
|
||||
if (save_drafts)
|
||||
for (EntityMessage orphan : orphans)
|
||||
EntityOperation.queue(context, orphan, EntityOperation.ADD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue