mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fix the sorting for favorites
This commit is contained in:
@@ -81,8 +81,13 @@ public class Favorite implements Serializable, Comparable<Favorite> {
|
||||
Component, Block
|
||||
}
|
||||
|
||||
public String toDisplay() {
|
||||
String[] parts = name.split("\\.");
|
||||
return parts[parts.length - 1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Favorite o) {
|
||||
return name.compareToIgnoreCase(o.getName());
|
||||
return toDisplay().compareToIgnoreCase(o.toDisplay());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user