|
|
@ -259,7 +259,7 @@ public class EntityFolder implements Serializable {
|
|
|
|
return folder;
|
|
|
|
return folder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void sort(List<EntityFolder> folders) {
|
|
|
|
static void sort(final Context context, List<EntityFolder> folders) {
|
|
|
|
final Collator collator = Collator.getInstance(Locale.getDefault());
|
|
|
|
final Collator collator = Collator.getInstance(Locale.getDefault());
|
|
|
|
collator.setStrength(Collator.SECONDARY); // Case insensitive, process accents etc
|
|
|
|
collator.setStrength(Collator.SECONDARY); // Case insensitive, process accents etc
|
|
|
|
|
|
|
|
|
|
|
@ -274,9 +274,9 @@ public class EntityFolder implements Serializable {
|
|
|
|
int c = -f1.synchronize.compareTo(f2.synchronize);
|
|
|
|
int c = -f1.synchronize.compareTo(f2.synchronize);
|
|
|
|
if (c != 0)
|
|
|
|
if (c != 0)
|
|
|
|
return c;
|
|
|
|
return c;
|
|
|
|
return collator.compare(
|
|
|
|
String name1 = f1.getDisplayName(context);
|
|
|
|
f1.name == null ? "" : f1.name,
|
|
|
|
String name2 = f2.getDisplayName(context);
|
|
|
|
f2.name == null ? "" : f2.name);
|
|
|
|
return collator.compare(name1, name2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|