Keep operation folder order

This commit is contained in:
M66B 2020-11-17 18:29:02 +01:00
parent 6f0c45826e
commit b2463b08db
1 changed files with 3 additions and 2 deletions

View File

@ -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<EntityFolder, IMAPFolder> mapFolders = new HashMap<>();
final Map<EntityFolder, IMAPFolder> mapFolders = new LinkedHashMap<>();
List<Thread> idlers = new ArrayList<>();
try {
// Initiate connection
@ -1305,7 +1306,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
public void onChanged(final List<TupleOperationEx> _operations) {
// Get new operations
List<Long> all = new ArrayList<>();
Map<Long, List<TupleOperationEx>> added = new HashMap<>();
Map<Long, List<TupleOperationEx>> added = new LinkedHashMap<>();
for (TupleOperationEx op : _operations) {
all.add(op.id);
if (!handling.contains(op.id)) {