Respect save drafts setting for draft orphans

pull/214/head
M66B 7 months ago
parent 974878adf0
commit 91dc834295

@ -812,8 +812,11 @@ public class EntityOperation {
List<EntityMessage> orphans = db.message().getDraftOrphans(folder.id); List<EntityMessage> orphans = db.message().getDraftOrphans(folder.id);
if (orphans != null) { if (orphans != null) {
EntityLog.log(context, "Draft orphans=" + orphans.size()); EntityLog.log(context, "Draft orphans=" + orphans.size());
for (EntityMessage orphan : orphans) SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
EntityOperation.queue(context, orphan, EntityOperation.ADD); boolean save_drafts = prefs.getBoolean("save_drafts", true);
if (save_drafts)
for (EntityMessage orphan : orphans)
EntityOperation.queue(context, orphan, EntityOperation.ADD);
} }
} }
} }

Loading…
Cancel
Save