Respect save drafts setting for draft orphans

This commit is contained in:
M66B 2024-02-01 20:44:38 +01:00
parent 974878adf0
commit 91dc834295
1 changed files with 5 additions and 2 deletions

View File

@ -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);
}
}
}