Debug: order answers by usage

This commit is contained in:
M66B
2021-05-13 21:27:40 +02:00
parent e2b6227bc6
commit 6344653f2f
2 changed files with 21 additions and 0 deletions

View File

@@ -1752,6 +1752,16 @@ public class FragmentCompose extends FragmentBase {
collator.setStrength(Collator.SECONDARY); // Case insensitive, process accents etc
Collections.sort(groups, collator);
Collections.sort(answers, new Comparator<EntityAnswer>() {
@Override
public int compare(EntityAnswer a1, EntityAnswer a2) {
if (!BuildConfig.DEBUG || a1.applied.equals(a2.applied))
return collator.compare(a1.name, a2.name);
else
return -a1.applied.compareTo(a2.applied);
}
});
Collections.sort(favorites, new Comparator<EntityAnswer>() {
@Override
public int compare(EntityAnswer a1, EntityAnswer a2) {