diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 83e64f2941..682515e374 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -61,6 +61,7 @@ import java.util.Comparator; import java.util.Date; import java.util.HashMap; import java.util.Hashtable; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -990,7 +991,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences } }); - final Map mapFolders = new HashMap<>(); + final Map mapFolders = new LinkedHashMap<>(); List idlers = new ArrayList<>(); try { // Initiate connection @@ -1305,7 +1306,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences public void onChanged(final List _operations) { // Get new operations List all = new ArrayList<>(); - Map> added = new HashMap<>(); + Map> added = new LinkedHashMap<>(); for (TupleOperationEx op : _operations) { all.add(op.id); if (!handling.contains(op.id)) {